Modify

Opened 15 years ago

Last modified 9 years ago

#7045 new task

[Patch] Timestamp problem with Trac 0.12

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

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

Download all attachments as: .zip

Change History (15)

Changed 15 years ago by anonymous

Attachment: tracmetrixplugin-012.patch added

comment:1 Changed 14 years ago by Ryan J Ollos

Summary: timestamp problem with trac 0.12[Patch] Timestamp problem with Trac 0.12

comment:2 Changed 14 years ago by Ryan J Ollos

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

comment:3 Changed 14 years ago by Ryan J Ollos

Owner: changed from Bhuricha Deen Sethanandha to Ryan J Ollos

Thanks for the patch. It will be incorporated shortly.

comment:4 Changed 14 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 14 years ago by Ryan J Ollos

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 14 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 14 years ago by Ryan J Ollos

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

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

comment:9 Changed 14 years ago by Ryan J Ollos

Status: newassigned

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

comment:10 Changed 14 years ago by Ryan J Ollos

#8483 closed as a duplicate.

comment:11 Changed 14 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 14 years ago by the3illings@…

fixes timestamp issue in tracmetrixplugin/model.py

comment:12 Changed 11 years ago by Ryan J Ollos

Status: assignednew

comment:13 Changed 9 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.