#5772 closed defect (fixed)
Can't watch tickets
Reported by: | Jimmy | Owned by: | Martin Scharrer |
---|---|---|---|
Priority: | high | Component: | WatchlistPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Hi,
I installed Watchlist plugin on my TRAC 0.11.3. It's a good plugin to make me to watch my favorite tickets and wikis.
I can add a wiki to my watchlist, but I can't add a ticket to the list.
When I clicked "watch" in the ticket page, I got the internal error below.
Oops… Trac detected an internal error:
NameError: global name 'commentnum' is not defined
This is probably a local installation issue. Found a bug in Trac?
If you think this should work and you can reproduce the problem, you should consider reporting this to the Trac team.
Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.
Trac | 0.11.3 | Python | 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] | setuptools | 0.6c9 | SQLite | 3.5.9 | pysqlite | 2.3.3 | Genshi | 0.5.1 | Pygments | 1.0 | GIT | 1.5.6.6 | jQuery: | 1.2.6
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 221, in process_request changes.extend( [format_change(field,oldvalue,newvalue), tag("; ") ]) File "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 204, in format_change href=href('ticket',id,action='diff',version=commentnum)), ")") NameError: global name 'commentnum' is not defined
a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
Python Traceback
Most recent call last:
- File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, 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:
- File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch
Code fragment:
- req.args.get('FORM_TOKEN') != req.form_token:
- raise HTTPBadRequest('Missing or invalid form token. '
- 'Do you have cookies enabled?')
- # Process the request and render the template
- resp = chosen_handler.process_request(req)
- if resp:
- if len(resp) == 2: # Clearsilver
- chrome.populate_hdf(req)
- template, content_type = \
- self._post_process_request(req, *resp)
- File "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 221, in process_request Local variables: Name Value action 'view' args {'resid': u'1', 'wikilist': [], 'ticket_perm': True, 'action': u'watch', ... author u'Jimmy.Wu' author_ u'Jimmy.Wu' changes [<Fragment>, <Fragment>] changetime 1251798343 count (1,) cursor <trac.db.util.IterableCursor object at 0x97a6434> db <trac.db.pool.PooledConnection object at 0x97a9a6c> field u'description' format_change <function format_change at 0x97a4b1c> href <trac.web.href.Href object at 0x957e9ec> id 1 is_watching False lst (u'Jimmy.Wu', u'ticket', u'1') newvalue u'= bug description =\r\n\r\n= bug analysis =\r\naaa\r\n= fix ... oldvalue u'= bug description =\r\n\r\n= bug analysis =\r\n\r\n= fix recommendation ... realm u'ticket' realm_perm True reporter u'Jimmy.Wu' req <Request "GET u'/watchlist'"> resid u'1' self <tracwatchlist.plugin.WatchlinkPlugin object at 0x957e22c> summary u'test' ticket_perm True ticketlist [] tickets [(1, u'enhancement', 1251797379, 1251798343, u'test', u'Jimmy.Wu')] time 1251797379 timeline '/sw1-trac/timeline?precision=seconds&from=' timeline_link <function timeline_link at 0x97a4c6c> type u'enhancement' user u'Jimmy.Wu' wiki_perm True wikilist [] wldict {'resid': u'1', 'wikilist': [], 'ticket_perm': True, 'action': u'watch', ... wlhref '/sw1-trac/watchlist'
- File "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 204, in format_change Local variables: Name Value field u'description' fieldtag <Element "strong"> href <trac.web.href.Href object at 0x957e9ec> id 1 newvalue u'= bug description =\r\n\r\n= bug analysis =\r\naaa\r\n= fix ... oldvalue u'= bug description =\r\n\r\n= bug analysis =\r\n\r\n= fix recommendation ... self <tracwatchlist.plugin.WatchlinkPlugin object at 0x957e22c>
File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg/trac/web/main.py", line 205, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 221, in process_requestFile "build/bdist.linux-i686/egg/tracwatchlist/plugin.py", line 204, in format_change
Attachments (0)
Change History (6)
comment:1 Changed 15 years ago by
Status: | new → assigned |
---|
comment:2 Changed 15 years ago by
I added a small fix in [6492] which might fix this. Please update to the newest SVN version and test it again. Please post future error messages wrapped between {{{
and }}}
lines to have them verbatim. Larger error messages should be attached as files.
comment:3 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
I patch it. Watchlist plugin is working well now. Thanks!
comment:4 Changed 15 years ago by
I patched my Trac 0.11.5 with [6492] and it helped me too. Thanks!
comment:5 Changed 15 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:6 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Hi, could you please check if this happens with all tickets independently if they have comments or not. Maybe the 'last comment' entry is not really initialised for tickets without comments.