Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10888 closed defect (cantfix)

NameError: global name 'Set' is not defined

Reported by: maheshp Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a POST operation on /milestone, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'fd51226e1dbcf03314855e9b',
 'action': u'edit',
 'description': u'Mobile Device Security Solution',
 'due': u'on',
 'duedate': u'03/31/15 18:00:00',
 'id': u'',
 'name': u'Mobile Device Security Solution'}

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1

System Information

Trac 0.12.2
Agilo 0.9.8
Docutils 0.7
Genshi 0.6
mod_python 3.3.1
Pygments 0.10
pysqlite 2.4.1
Python 2.6.6 (r266:84292, Oct 9 2010, 11:55:20)
[GCC 4.4.5]
pytz 2008c
setuptools 0.6
SQLite 3.7.3
Subversion 1.6.12 (r955767)
jQuery 1.4.2

Enabled Plugins

binary-agilo 1.3.8-PRO

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.6/dist-packages/trac/ticket/roadmap.py", line 595, in process_request
    return self._do_save(req, db, milestone)
  File "/usr/lib/python2.6/dist-packages/trac/ticket/roadmap.py", line 634, in _do_save
    milestone.due = due and parse_date(due, req.tz, 'datetime') or None
  File "/usr/lib/python2.6/dist-packages/trac/util/datefmt.py", line 249, in parse_date
    dt = tzinfo.localize(datetime(*tm[0:6]))
  File "/usr/lib/python2.6/dist-packages/pytz/tzinfo.py", line 245, in localize
    possible_loc_dt = Set()
NameError: global name 'Set' is not defined

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 12 years ago

pytz 2008c seems quite outdated.

Try easy_install -U pytz.

comment:2 by Remy Blank, 12 years ago

Resolution: cantfix
Status: newclosed

Also, that's not an issue in Trac.

in reply to:  1 comment:3 by anonymous, 12 years ago

Replying to cboos:

pytz 2008c seems quite outdated.

Try easy_install -U pytz.

This did not work even after updating pytz

comment:4 by Christian Boos, 12 years ago

Well, this isn't the place for pytz support, but anyway…

My pytz/tzinfo.py doesn't have this line, I have instead:

        possible_loc_dt = set()

And at the top of that file, I have the following:

try:
    set
except NameError:
    from sets import Set as set

(IIRC, set is a builtin since Python 2.4)

Check that the easy_install command you used really corresponds to the Python version you use for Trac. If this is not enough of an advice, as this is really an InstallationIssue, please try to get some general support from Python on your platform.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.