#6090 closed defect (fixed)
Just installed in 11.5, get error when trying to use it
| Reported by: | Thanatermesis | Owned by: | Martin Scharrer | 
|---|---|---|---|
| Priority: | normal | Component: | WatchlistPlugin | 
| Severity: | major | Keywords: | |
| Cc: | Martin Scharrer | Trac Release: | 0.11 | 
Description
New 11.5 install, WatchlistPlugin not looks like to work, I have the links to Watchlist but when I try to click in any of them i have that error:
Short
File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 444, in _dispatch_request dispatcher.dispatch(req) File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 205, in dispatch resp = chosen_handler.process_request(req) File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 244, in process_request wldict['user_settings'] = self._get_user_settings(user) File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 115, in _get_user_settings (settingsstr,) = cursor.fetchone()
Long
Python Traceback
Most recent call last:
    * File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 444, in _dispatch_request
      Code fragment:
       439. try:
       440. if not env and env_error:
       441. raise HTTPInternalError(env_error)
       442. try:
       443. dispatcher = RequestDispatcher(env)
       444. dispatcher.dispatch(req)
       445. except RequestDone:
       446. pass
       447. resp = req._response or []
       448.  
       449. 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 0x7f39c18a0d50>
      e 	<exceptions.TypeError instance at 0x7f39c17c6440>
      env 	<trac.env.Environment object at 0x7f39c4b72e10>
      env_error 	None
      exc_info 	(<class exceptions.TypeError at 0x7f39c87de230>, <exceptions.TypeError ...
      filename 	'/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/ ...
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	443
      message 	u'TypeError: unpack non-sequence'
      req 	<Request "GET u'/watchlist'">
      resp 	[]
      tb 	<traceback object at 0x7f39c17c6dd0>
      tb_hide 	None
      traceback 	u'Traceback (most recent call last):\n File ...
    * File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 205, in dispatch
      Code fragment:
       200. req.args.get('__FORM_TOKEN') != req.form_token:
       201. raise HTTPBadRequest('Missing or invalid form token. '
       202. 'Do you have cookies enabled?')
       203.  
       204. # Process the request and render the template
       205. resp = chosen_handler.process_request(req)
       206. if resp:
       207. if len(resp) == 2: # Clearsilver
       208. chrome.populate_hdf(req)
       209. template, content_type = \
       210. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<tracwatchlist.plugin.WatchlinkPlugin object at 0x7f39c18a0250>
      chrome 	<trac.web.chrome.Chrome object at 0x7f39c18a0550>
      err 	(<class exceptions.TypeError at 0x7f39c87de230>, <exceptions.TypeError ...
      handler 	<tracwatchlist.plugin.WatchlinkPlugin object at 0x7f39c18a0250>
      req 	<Request "GET u'/watchlist'">
      self 	<trac.web.main.RequestDispatcher object at 0x7f39c18a0d50>
    * File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 244, in process_request
      Code fragment:
       239. del d['action']
       240. self._save_user_settings(user, d)
       241. action = "view"
       242. wldict['user_settings'] = d
       243. else:
       244. wldict['user_settings'] = self._get_user_settings(user)
       245.  
       246. wldict['is_watching'] = is_watching
       247. if action == "view":
       248. timeline = href('timeline', precision='seconds') + "&from="
       249. def timeline_link(time):
      Local variables:
      Name	Value
      action 	'view'
      args 	{}
      cursor 	<trac.db.util.IterableCursor object at 0x7f39c1871ad0>
      db 	<trac.db.pool.PooledConnection object at 0x7f39c17630a0>
      gnotify 	False
      href 	<trac.web.href.Href object at 0x7f39c18fec50>
      is_watching 	None
      ispattern 	False
      req 	<Request "GET u'/watchlist'">
      self 	<tracwatchlist.plugin.WatchlinkPlugin object at 0x7f39c18a0250>
      ticket_perm 	True
      user 	u'thanatermesis'
      wiki_perm 	True
      wldict 	{'wiki_perm': True, 'notify': False, 'ticket_perm': True}
      wlhref 	'/watchlist'
    * File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 115, in _get_user_settings
      Code fragment:
       110. cursor = db.cursor()
       111. cursor.execute(
       112. "SELECT settings FROM watchlist_settings WHERE wluser = %s",
       113. (user,) )
       114.  
       115. (settingsstr,) = cursor.fetchone()
       116. try:
       117. return dict([ kv.split('=') for kv in settingsstr.split("&") ])
       118. except:
       119. return dict()
       120.  
      Local variables:
      Name	Value
      cursor 	<trac.db.util.IterableCursor object at 0x7f39c1a62f90>
      db 	<trac.db.pool.PooledConnection object at 0x7f39c18b7e10>
      self 	<tracwatchlist.plugin.WatchlinkPlugin object at 0x7f39c18a0250>
      user 	u'thanatermesis'
File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 444, in _dispatch_request
  dispatcher.dispatch(req)
File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 205, in dispatch
  resp = chosen_handler.process_request(req)
File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 244, in process_request
  wldict['user_settings'] = self._get_user_settings(user)
File "/home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6942-py2.4.egg/tracwatchlist/plugin.py", line 115, in _get_user_settings
  (settingsstr,) = cursor.fetchone()
    Attachments (0)
Change History (15)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
| Status: | new → assigned | 
|---|
Should be fixed in [6944]. Please install and acknowledge that.
What database backend do you using? The default sqlite or postgres?
comment:3 Changed 16 years ago by
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
I just successfully tested it on my test trac system and the error is now gone.
Thanks also for the detailed error log - many people forget about such things - but next time please also post the error headline which shows up in the browser:
Trac detected an internal error: TypeError: 'NoneType' object is not iterable
This helps to now what kind of error it is. Reading this information out of the detailed log is possible but a little difficult.
comment:4 Changed 16 years ago by
Ok, i will try to remember the next time :)
Not yet fixed there
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int) FROM watchlist WHERE wluser='thanatermesis' AND realm='ticket') GROUP BY id' at line 1")
The database that i use is mysql
There's the traceback (in order to not flood much there) http://debian.pastebin.com/m579cb372
comment:5 Changed 16 years ago by
comment:6 Changed 16 years ago by
comment:7 Changed 16 years ago by
I installed now MySQL to test the plugin. The watchlist works for me as of [6949]. Please test and acknowledge.
comment:8 Changed 16 years ago by
comment:9 follow-up: 10 Changed 16 years ago by
Still not working:
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int) FROM watchlist WHERE wluser='thanatermesis' AND realm='ticket') GROUP BY id' at line 1")
I dont need to run a trac-admin upgrade (again) right ? so in any case it says that my database is up to date and there's no need to upgrade
Btw, I don't think that matters, but the conf line automatically added is not like in the description but like: tracwatchlist.plugin.watchlinkplugin = enabled
comment:10 Changed 16 years ago by
Replying to anonymous:
Still not working:
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int) FROM watchlist WHERE wluser='thanatermesis' AND realm='ticket') GROUP BY id' at line 1")
You are using an old version of the watchlist plugin. Did you installed it from the SVN repository or over your OS package manager? Please install at least v0.4.6950, i.e. [6950] from the SVN repository as described at WatchlistPlugin#Installation.
I dont need to run a trac-admin upgrade (again) right ? so in any case it says that my database is up to date and there's no need to upgrade
Do not worry, if you would need to run it again it would tell you - very loudly.
Btw, I don't think that matters, but the conf line automatically added is not like in the description but like: tracwatchlist.plugin.watchlinkplugin = enabled
If you get the above error the plugin is used so this line seems to be ok. However, there was a typo in the setup file of the version you use: watchlinkplugin should be watchlistplugin.
I think you have to change that when you update to a newer version of the plugin.
comment:11 Changed 16 years ago by
Mmmh, that's teh option
Now i got this error:
TemplateNotFound: Template "watchlist.html" not found
Short:
Most recent call last: File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 444, in _dispatch_request dispatcher.dispatch(req) File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/main.py", line 226, in dispatch data, content_type) File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/chrome.py", line 730, in render_template template = self.load_template(filename, method=method) File "/home/elivedev/packages/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/web/chrome.py", line 704, in load_template return self.templates.load(filename, cls=cls) File "/var/lib/python-support/python2.4/genshi/template/loader.py", line 237, in load raise TemplateNotFound(filename, search_path)
long: http://debian.pastebin.com/m7d88e716
Note the line:
search_path ['/home/elivedev/trac_sites/Elive/templates', ...
I have it installed on this dir: /home/elivedev/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6964-py2.4.egg
Since I dont have root on this server i need to use (this works with the rest of things installed): easy_install --prefix=$HOME/packages http://....
For a faster tests maybe you can try to enter in the #trac channel in IRC, im with nickname wald0
comment:12 Changed 16 years ago by
Enabling/disabling it from the Admin menu (so, graphically, no editing the .ini file), it automatically adds this line, just looking at this:
tracwatchlist.plugin.watchlinkplugin = disabled
So I mean that this is the default value set by the Trac gui Admin tab plugins section
Nothing about tracwatchlist.* = enabled
comment:13 Changed 16 years ago by
comment:14 Changed 16 years ago by
It looks like to work after to link the template, im not sure if is fixed or not in tracwatchlist or not for future (new) installs, that's what i have nededed to do, note my actual dir:
$ pwd /home/elivedev/trac_sites/Elive/templates $ ln -s $HOME/packages/lib/python2.4/site-packages/TracWatchlistPlugin-0.4.6973-py2.4.egg/tracwatchlist/templates/watchlist.html .
Perfectly working after to do that :)
comment:15 Changed 16 years ago by
IMHO this seem be a configuration or installation issue, e.g. maybe wrong include paths. It works fine on all of mine installation and the template file is correctly placed in the installation package.
Anyway, I'm happy that it finally works for you.




(In [6944]) Fixed error occurring if user does not has a settings entry in
watchlist_settingstable. See #6090.