Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2745 closed defect (wontfix)

''All Tickets By Milestone'' Report fails

Reported by: stephane Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I use trac 0.9.3 with python 2.3.5 and svn 1.2.3 on windows xp.

When I click on:

{6}  	All Tickets By Milestone (Including closed)

I get an oops. Below is the traceback, unfortunately I can't say since when or why this happened.

I added and deleted milestones, perhaps it comes from there, but since its the first time I tried this report ..

… sorry guys, I can't provide more information. Pleas ask me what to test and I can do it, otherwise skip it.

Python traceback

Traceback (most recent call last):
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\standalone.py", line 303, in _do_trac_req
    dispatch_request(path_info, req, env)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\ticket\report.py", line 117, in process_request
    resp = self._render_view(req, db, id)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\ticket\report.py", line 355, in _render_view
    value['date'] = util.format_date(cell)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\util.py", line 365, in format_date
    return format_datetime(t, format, gmt)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\util.py", line 359, in format_datetime
    t = time.localtime(int(t))
ValueError: invalid literal for int(): 1130421255.63

Attachments (0)

Change History (6)

comment:1 by anonymous, 18 years ago

Milestone: 0.9.5
Version: 0.9.30.9.4

Retested it with trac 0.9.4, the problem seems to be still here.

What cound I do to find out whats wrong?

Python traceback

Traceback (most recent call last):
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\standalone.py", line 303, in _do_trac_req
    dispatch_request(path_info, req, env)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\web\main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\ticket\report.py", line 113, in process_request
    resp = self._render_view(req, db, id)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\ticket\report.py", line 354, in _render_view
    value['date'] = util.format_date(cell)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\util.py", line 409, in format_date
    return format_datetime(t, format, gmt)
  File "G:\PROGRA~1\util\python\Lib\site-packages\trac\util.py", line 403, in format_datetime
    t = time.localtime(int(t))
ValueError: invalid literal for int(): 1130421255.63

comment:2 by Matthew Good, 18 years ago

The problem is that the value of the timestamp it's formatting is a floating point number instead on an integer. Trac only stores the timestamps as integers, so I'm assuming you imported data from another source. It would be helpful to know what you were using to do this.

If you're using sqlite3 you should be able to use a query like to following to convert the columns to integer values (though you may need to add some additional columns):

update ticket set time = cast(time as int)

comment:3 by stephane, 18 years ago

Resolution: wontfix
Status: newclosed

I didn't import tickets from other data…

… at least I cant't remember (perhaps I made some test at the very beginning??). I also switched from pysqlite 1.1.6 to 2.0.4 and now 2.0.7, perhaps this was a problem?

I started using trac since beta 0.9b1 and newer used the All Tickets By Milestone (Including closed) report.

So perhaps I did some ticket import tests (last year), or something doesn't work sometimes.

At least I think its too late to figure out whats happened.

I don't know sqlite at all, do I really need it or can I do the

update ticket set time = cast(time as int)

with pysqlite alone?

Meanwhile I close this ticket, if I have time I will try to fix it (since I have to learn sqlite or pysqlite … )

comment:4 by Christopher Lenz, 18 years ago

At one point we had a bug in the milestone retargetting code that would cause floating point numbers to be used in the modified tickets' timestamps. I guess this may be what caused the problem with your data.

comment:5 by Matthew Good, 18 years ago

Milestone: 0.9.5

comment:6 by stephane, 18 years ago

Sorry for bothering you … is there some example how to get this

update ticket set time = cast(time as int)

work?

do I have to type in something like:

sqlite3.exe -init trac.db "update ticket set time = cast(time as int)" > output

I tried different things without success.. so my question: is there a simple example how to do what?

Otherwise it's perhaps easyer to set up my trac from scratch?

Thanks :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.