Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7735 closed defect (invalid)

NameError: global name 'sorted' is not defined

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

Description

How to Reproduce

While doing a GET operation on /newticket, Trac issued an internal error.

Added the following to trac.ini (after installing plugin successfully without errors):

[components] ticketsubmitpolicy.* = enabled

[ticket-submit-policy] policy1.condition = type is not defect policy1.excludes = version

User Agent was: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1

System Information

Trac 0.11
Python 2.3.4 (#1, Dec 11 2007, 05:28:55)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
setuptools 0.6c8
SQLite 3.3.6
pysqlite 1.1.7
Genshi 0.5
Pygments 0.9
Subversion 1.1.4 (r13838)
jQuery: 1.2.3

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 219, in dispatch
    data, content_type)
  File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/chrome.py", line 690, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "build/bdist.linux-x86_64/egg/genshi/core.py", line 128, in __or__
    __swig_getmethods__["size"] = _core.svn_dirent_t_size_get
  File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/chrome.py", line 789, in inner
    data)
  File "/usr/lib/python2.3/site-packages/TicketSubmitPolicy-0.7-py2.3.egg/ticketsubmitpolicy/ticketsubmitpolicy.py", line 161, in filter_stream
    policies = self.parse()
  File "/usr/lib/python2.3/site-packages/TicketSubmitPolicy-0.7-py2.3.egg/ticketsubmitpolicy/ticketsubmitpolicy.py", line 108, in parse
    comparitors = sorted(self.comparitors.keys(), key=lambda x: len(x), reverse=True)
NameError: global name 'sorted' is not defined

Attachments (0)

Change History (1)

comment:1 by osimons, 16 years ago

Priority: highnormal
Resolution: invalid
Severity: blockernormal
Status: newclosed

As traceback shows, this is trachacks:TicketSubmitPolicyPlugin again (like #7734). Please file the ticket against the plugin at Trac-Hacks.org.

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.