Opened 16 years ago
Last modified 10 years ago
#7045 new task
[Patch] Timestamp problem with Trac 0.12
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Component: | TracMetrixPlugin | 
| Severity: | normal | Keywords: | 0.12 timestamp | 
| Cc: | Trac Release: | 0.12 | 
Description
The timestamp format in 0.12 has changed see ApiChanges/0.12.
I fixed the internal error messages with the attached patch (includes the patch from #6149), but I am not sure if there are timezone issues left.
Attachments (2)
Change History (15)
Changed 16 years ago by
| Attachment: | tracmetrixplugin-012.patch added | 
|---|
comment:1 Changed 15 years ago by
| Summary: | timestamp problem with trac 0.12 → [Patch] Timestamp problem with Trac 0.12 | 
|---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
| Owner: | changed from Bhuricha Deen Sethanandha to Ryan J Ollos | 
|---|
Thanks for the patch. It will be incorporated shortly.
comment:4 Changed 15 years ago by
I seem to be having the same issue even with the patch. Any ideas? Thanks.
How to Reproduce
While doing a GET operation on /mdashboard/10/26/2010, Trac issued an internal error.
Request parameters:
{'id': u'10/26/2010'}
User agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.5 Safari/534.10
System Information
 Trac  |  0.12 
 | 
 Genshi  |  0.6 
 | 
 GIT  |  1.6.0.6 
 | 
 Pygments  |  1.1.1 
 | 
 pysqlite  |  2.3.5 
 | 
 Python  |  2.5.2 (r252:60911, Sep 30 2008, 15:42:03)  [GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] 
 | 
 pytz  |  2010h 
 | 
 setuptools  |  0.6c11 
 | 
 SQLite  |  3.5.9 
 | 
 Subversion  |  1.6.5 (r38866) 
 | 
 jQuery  |  1.4.2 
 | 
Enabled Plugins
 AutocompleteUsers  |  0.4.1 
 | 
 TracAccountManager  |  0.2.1dev-r7737 
 | 
 TracGit  |  0.12.0.2dev-r7757 
 | 
 TracMediaWikiMacro  |  1.0 
 | 
 TracMetrixPlugin  |  0.1.8 
 | 
 TracPermRedirect  |  2.0 
 | 
Python Traceback
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.12-py2.5.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.12-py2.5.egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracMetrixPlugin-0.1.8-py2.5.egg/tracmetrixplugin/mdashboard.py", line 361, in process_request
    component_group_available = False
  File "/usr/lib/python2.5/site-packages/TracMetrixPlugin-0.1.8-py2.5.egg/tracmetrixplugin/mdashboard.py", line 448, in _render_view
    #                   (req.tz,from_utimestamp(min_time).date(), \
ValueError: year is out of range
    comment:5 Changed 15 years ago by
Your milestone is named 10/26/2010? I wonder if it doesn't like the forward slashes. Do you get the same error for a milestone not containing forward slashes?
comment:6 Changed 15 years ago by
I tried a different name, "Milestone Q4 2010", and still got the same results:
While doing a GET operation on 0, Trac issued an internal error.
Python Traceback
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.12-py2.5.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.12-py2.5.egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracMetrixPlugin-0.1.8-py2.5.egg/tracmetrixplugin/mdashboard.py", line 361, in process_request
    component_group_available = False
  File "/usr/lib/python2.5/site-packages/TracMetrixPlugin-0.1.8-py2.5.egg/tracmetrixplugin/mdashboard.py", line 448, in _render_view
    #                   (req.tz,from_utimestamp(min_time).date(), \
ValueError: year is out of range
    comment:7 Changed 15 years ago by
It has been working for me in a Trac development environment, so I don't have any ideas of what could be wrong. I'll have to look into it more when I have some free time.
comment:8 Changed 15 years ago by
Thanks for your time. I'll continue to trouble shoot myself and post the results here.
comment:9 Changed 15 years ago by
| Status: | new → assigned | 
|---|
This issue may be resolved for you with the changes now in [9565].
comment:11 Changed 15 years ago by
As already discussed in #8483, also model.py is affected by the new timestamp API. This leads to an empty 'Repository Statistcs' chart.
I will attach a patch.
Changed 15 years ago by
| Attachment: | tracmetrixplugin-model.py-timestamp.patch added | 
|---|
fixes timestamp issue in tracmetrixplugin/model.py
comment:12 Changed 12 years ago by
| Status: | assigned → new | 
|---|
comment:13 Changed 10 years ago by
| Owner: | Ryan J Ollos deleted | 
|---|



(In [8622]) Creating a branch for Trac 0.12. Refs #7045.