Modify

Opened 4 years ago

Last modified 10 months ago

#7045 new task

[Patch] Timestamp problem with Trac 0.12

Reported by: bernd.tegge@… Owned by: rjollos
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)

tracmetrixplugin-012.patch (3.9 KB) - added by anonymous 4 years ago.
tracmetrixplugin-model.py-timestamp.patch (1.0 KB) - added by the3illings@… 3 years ago.
fixes timestamp issue in tracmetrixplugin/model.py

Download all attachments as: .zip

Change History (14)

Changed 4 years ago by anonymous

comment:1 Changed 4 years ago by rjollos

  • Summary changed from timestamp problem with trac 0.12 to [Patch] Timestamp problem with Trac 0.12

comment:2 Changed 4 years ago by rjollos

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

comment:3 Changed 4 years ago by rjollos

  • Owner changed from khundeen to rjollos

Thanks for the patch. It will be incorporated shortly.

comment:4 Changed 4 years ago by nick@…

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 4 years ago by rjollos

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 4 years ago by anonymous

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 4 years ago by rjollos

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 4 years ago by anonymous

Thanks for your time. I'll continue to trouble shoot myself and post the results here.

comment:9 Changed 3 years ago by rjollos

  • Status changed from new to assigned

This issue may be resolved for you with the changes now in [9565].

comment:10 Changed 3 years ago by rjollos

#8483 closed as a duplicate.

comment:11 Changed 3 years ago by the3illings@…

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 3 years ago by the3illings@…

fixes timestamp issue in tracmetrixplugin/model.py

comment:12 Changed 10 months ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.