Modify

Opened 16 years ago

Closed 14 years ago

#4849 closed defect (duplicate)

"NameError: global name 'sorted' is not defined" after clicking "Users"

Reported by: silverblood Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: NameError Users
Cc: Trac Release: 0.11

Description

after clicking "Users" in the admin tab, a "NameError: global name 'sorted' is not defined" is received. this would seem to be an issue related to python 2.3 compatibility.

my solution was to edit acct_mgr/admin.py and replace the line:

from trac.util import sorted

with:

from trac.util.compat import set, sorted

and rebuild the egg.

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by silverblood

a better version of the above fix that still seems to work correctly, but not fully tested as I lack a way to test with a newer version of python.

try:
	from trac.util import sorted
except ImportError:
	from trac.util.compat import set, sorted

comment:2 Changed 14 years ago by Steffen Hoffmann

Owner: changed from John Hampton to Steffen Hoffmann

As in recent Trac versions trac/util/init module sorted is imported from trac/util/compat.py, this is certainly a valid assertion.

comment:3 in reply to:  2 Changed 14 years ago by Steffen Hoffmann

Resolution: duplicate
Status: newclosed

Replying to hasienda:

As in recent Trac versions trac/util/init module sorted is imported from trac/util/compat.py, this is certainly a valid assertion.

Meant 'trac/util/__init__', but despite of the much better report quality this is still a duplicate of ticket #4830.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.