Opened 16 years ago
Closed 15 years ago
#4151 closed defect (fixed)
ValueError: need more than 1 value to unpack
Reported by: | alexei | Owned by: | Robert Corsaro |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | |
Cc: | Robert Corsaro | Trac Release: | 0.11 |
Description
How to Reproduce
While doing a GET operation on /ticketstats
, Trac issued an internal error.
Basically it just goes straight to this error when I click on Ticket Stats in the menu.
User Agent was: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
System Information
Trac | 0.11.2.1
|
Python | 2.5.1 (r251:54863, Dec 7 2007, 23:58:55) [GCC 4.2.1 20070719 [FreeBSD]]
|
setuptools | 0.6c5
|
MySQL | server: "5.1.22-rc", client: "5.1.22-rc", thread-safe: 1
|
MySQLdb | 1.2.2
|
Genshi | 0.6dev-r960
|
mod_python | 3.3.1
|
Subversion | 1.4.4 (r25188)
|
jQuery: | 1.2.6
|
Python Traceback Most recent call last: File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 432, in _dispatch_request Code fragment:
try: if not env and env_error: raise HTTPInternalError(env_error) try: dispatcher = RequestDispatcher(env)
dispatcher.dispatch(req)
except RequestDone: pass resp = req._response or [] except HTTPException, e:
Local variables:
Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher <trac.web.main.RequestDispatcher object at 0x2a7be84c> e ValueError('need more than 1 value to unpack',) env <trac.env.Environment object at 0x2a22148c> env_error None exc_info (<type 'exceptions.ValueError'>, ValueError('need more than 1 value to ... filename '/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/ma ... frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 431 message u'ValueError: need more than 1 value to unpack' req <Request "GET u'/ticketstats'"> resp [] tb <traceback object at 0x2aa48b6c> tb_hide None traceback 'Traceback (most recent call last):\n File ...
File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 174, in dispatch Code fragment:
if not req.path_info or req.path_info == '/': chosen_handler = self.default_handler # pre-process any incoming request, whether a handler # was found or not chosen_handler = self._pre_process_request(req,
chosen_handler)
except TracError, e: raise HTTPInternalError(e) if not chosen_handler: if req.path_info.endswith('/'): # Strip trailing / and redirect
Local variables:
Name Value chosen_handler <ticketstats.ticketstats.TicketStatsPlugin object at 0x2a7bec8c> chrome <trac.web.chrome.Chrome object at 0x2a7be0cc> err (<type 'exceptions.ValueError'>, ValueError('need more than 1 value to ... handler <ticketstats.ticketstats.TicketStatsPlugin object at 0x2a7bec8c> req <Request "GET u'/ticketstats'"> self <trac.web.main.RequestDispatcher object at 0x2a7be84c>
File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 295, in _pre_process_request Code fragment:
req.outcookietrac_form_token?secure? = True return req.outcookietrac_form_token?.value def _pre_process_request(self, req, chosen_handler): for filter_ in self.filters:
chosen_handler = filter_.pre_process_request(req, chosen_handler)
return chosen_handler def _post_process_request(self, req, *args): nbargs = len(args) resp = args
Local variables:
Name Value chosen_handler <ticketstats.ticketstats.TicketStatsPlugin object at 0x2a7bec8c> filter_ <announcerplugin.subscribers.watchers.WatchSubscriber object at ... req <Request "GET u'/ticketstats'"> self <trac.web.main.RequestDispatcher object at 0x2a7be84c>
File "build/bdist.freebsd-7.0-RELEASE-i386/egg/announcerplugin/subscribers/watchers.py", line 142, in pre_process_request Local variables: Name Value handler <ticketstats.ticketstats.TicketStatsPlugin object at 0x2a7bec8c> path u'ticketstats' pattern u'ticket/*' req <Request "GET u'/ticketstats'"> self <announcerplugin.subscribers.watchers.WatchSubscriber object at ... File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 432, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 174, in dispatch
chosen_handler)
File "/usr/local/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 295, in _pre_process_request
chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "build/bdist.freebsd-7.0-RELEASE-i386/egg/announcerplugin/subscribers/watchers.py", line 142, in pre_process_request
Attachments (0)
Change History (7)
comment:1 Changed 15 years ago by
Trac Release: | 0.10 → 0.11 |
---|
comment:2 Changed 15 years ago by
Same issue here ;
Seems that when i'm -not- logged in I can view the stats, but when I'm logged in under a username with, and without the TSTATS_VIEW permission I get the error.
comment:3 Changed 15 years ago by
Component: | TracTicketStatsPlugin → AnnouncerPlugin |
---|---|
Owner: | changed from Prentice Wongvibulsin to Stephen Hansen |
#T8885 was a duplicate.
It seems to be an AnnouncerPlugin bug, as it probably "watches" for /ticket... and here it matches /ticketstats.
Ok, looking at the code, the watchable_paths
are specified as glob patterns, but in post_process_request
, a re.match
is done, which explains why ticket/*
will match ticketstats
;-)
Should use fnmatch.fnmatch
instead.
comment:4 Changed 15 years ago by
Cc: | Robert Corsaro added; anonymous removed |
---|
Looks like doki_pen is not set as owner...
comment:5 Changed 15 years ago by
Can somebody submit a patch please? Announcer breaks several plugins which have menu items that contain "ticket" in their name like Ticketstats or Gantt Tickets
comment:6 Changed 15 years ago by
Owner: | changed from Stephen Hansen to Robert Corsaro |
---|---|
Status: | new → assigned |
comment:7 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I am having the same issue. Has this ever been resolved?