trac-hacks / tracstats

Project and source code statistics plugin for Trac.
http://trac-hacks.org/wiki/TracStatsPlugin
Other
20 stars 13 forks source link

Code View Crash #10

Closed keithburgoyne closed 14 years ago

keithburgoyne commented 14 years ago

When clicking on the "Code" (/stats/code) link, and after waiting a few seconds, I am presented with this stack trace:

Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/api.py", line 
377, in send_error
'text/html')
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py", 
line 733, in render_template
message = req.session.pop('chrome.%s.%d' % (type_, i))
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/api.py", line 
195, in __getattr__
value = self.callbacks[name](self)
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/main.py", line 
265, in _get_session
return Session(self.env, req)
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/session.py", 
line 160, in __init__
self.get_session(req.authname, authenticated=True)
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/session.py", 
line 176, in get_session
super(Session, self).get_session(sid, authenticated)
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/session.py",  
line 59, in get_session
(sid, int(authenticated)))
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/db/util.py", line 64, 
in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/db/util.py", line 64, 
in execute
return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of 
transaction block"

Any idea what might be the issue here? Thanks!

keithburgoyne commented 14 years ago

I should also point out that we are using postgresql-8.2.7 as a backend.

mrjbq7 commented 14 years ago

This should be fixed in the latest version, can you try again?

I removed a temporary table that was causing some of these problems in some Trac installations. It's also a LOT faster on Trac 0.12.

Vasja commented 14 years ago

Hi, I have similar error. I can not browse code view of stats. I'm connected to git repository! (svn aparently looks ok on the same instalation)

My error is: ValueError: invalid literal for int() with base 10: ...

Python Traceback

Most recent call last: File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 513, in _dispatch_request File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 235, in dispatch File "/usr/local/lib/python2.6/dist-packages/TracStats-0.3-py2.6.egg/tracstats/web_ui.py", line 131, in process_request File "/usr/local/lib/python2.6/dist-packages/TracStats-0.3-py2.6.egg/tracstats/web_ui.py", line 329, in _process_code

Trac 0.12 CustomFieldAdmin 0.2.2 Genshi 0.6 GIT 1.7.0.4 mod_wsgi 2.8 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL}) pysqlite 2.4.1 Python 2.6.5 (r265:79063, Apr 16 2010, 14:15:55) [GCC 4.4.3] setuptools 0.6 SQLite 3.6.22 Subversion 1.6.6 (r40053) jQuery 1.4.2

TracStats 0.3 /usr/local/lib/python2.6/dist-packages/TracStats-0.3-py2.6.egg

Best, Vasja

mrjbq7 commented 14 years ago

I had not tried it with Git (some of the code was assuming integer revision numbers instead of SHA-style hashes).

Should be fixed now. Can you try again with the latest?

Vasja commented 14 years ago

Hi, thank you! It did fix the issue! now it works as expected!

Best, Vasja

mrjbq7 commented 14 years ago

Resolving this as fixed. Thanks!