trac-hacks / tracstats

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

ValueError: timestamp out of range for platform time_t #8

Closed hfcorriez closed 14 years ago

mrjbq7 commented 14 years ago

Could you give me some more information? Do you have a stack trace? A URL that triggered it? What platform do you run on? Thanks!

teha75 commented 14 years ago

This is probably a trac 0.12 issue.

In 0.12.x the timestamps format in the db has been changed to microseconds. (see http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.12#Timestampstorageindatabase)

I'm trying to get it to work under 0.12 but since the time-stuff is all over the plugin it is a lot of work. When reading the time from db it has to be converted by from_utimestamp().

Maybe you can have a look at this, because trac 0.12 is soon to be released as stable...

mrjbq7 commented 14 years ago

I got it working with 0.12b1, would you try again? It isn't the prettiest change, but we can clean it up once it's working.

teha75 commented 14 years ago

Yes it works with Trac 0.12dev-r9684!

Everything but the Code-Page works. On Code Page i get a "IndexError: string index out of range" Error

File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request
File "build/bdist.linux-i686/egg/trac/web/main.py", line 234, in dispatch
File "/usr/local/lib/python2.6/site-packages/TracStats-0.3-    py2.6.egg/tracstats/web_ui.py", line 122, in process_request
File "/usr/local/lib/python2.6/site-packages/TracStats-0.3-py2.6.egg/tracstats/web_ui.py", line 626, in _process_code
File "/usr/local/lib/python2.6/site-packages/TracStats-0.3-py2.6.egg/tracstats/web_ui.py", line 626, in <lambda>
mrjbq7 commented 14 years ago

Are you using Subversion or Mercurial? That line indicates that a path that was changed in the repository starts with a "/", which I haven't seen before.

mrjbq7 commented 14 years ago

I pushed a small fix that assumes the project is "None" in this case. Can you try it?

teha75 commented 14 years ago

This works - thx! We use subversion!

teha75 commented 14 years ago

This issue should be resolved - i guess.

mrjbq7 commented 14 years ago

Resolving as fixed. Thanks!