Modify

Opened 12 years ago

Closed 7 years ago

#10330 closed defect (fixed)

ValueError: timestamp out of range for platform time_t

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: BacklogPlugin
Severity: normal Keywords:
Cc: Anna Nachesa, Bart Ogryczak Trac Release: 0.12

Description

How to Reproduce

While doing a GET operation on /backlog/1, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'backlog_id': u'1'}

User agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.49 Safari/537.1

System Information

Trac 0.12
Genshi 0.6
Pygments 1.3.1
pysqlite 2.6.0
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
setuptools 0.6
SQLite 3.7.3
Subversion 1.7.5 (r1336830)
jQuery 1.4.2

Enabled Plugins

BacklogPlugin 0.1.36

Python Traceback

Traceback (most recent call last):
  File "/home/user/Workspace/th10326/trac-0.12/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/home/user/Workspace/th10326/trac-0.12/trac/web/main.py", line 256, in dispatch
    content_type)
  File "/home/user/Workspace/th10326/trac-0.12/trac/web/chrome.py", line 844, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th10326/trac-0.12/trac/web/chrome.py", line 945, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th10326/trac-0.12/trac/web/chrome.py", line 934, in _generate
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 565, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/home/user/Workspace/th10326/genshi-0.6.0/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/home/user/Workspace/trac-hacks/backlogplugin/trunk/backlog/templates/backlog.html", line 73, in <Expression u"str(datetime.now() - datetime.fromtimestamp(ticket.time)).split(',')[0].split('.')[0]">
    <td style="width: 60px;">${str(datetime.now() - datetime.fromtimestamp(ticket.time)).split(',')[0].split('.')[0]}</td>
ValueError: timestamp out of range for platform time_t

Attachments (2)

TimeOpen.png (3.0 KB) - added by Ryan J Ollos 12 years ago.
TimeOpen2.png (2.9 KB) - added by Ryan J Ollos 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by Ryan J Ollos

This issue was first reported in comment:3:ticket:8653.

Changed 12 years ago by Ryan J Ollos

Attachment: TimeOpen.png added

comment:2 Changed 12 years ago by Ryan J Ollos

Status: newassigned

The time open is currently shown in the DD:HH:MM format.

This will be changed to a pretty print format, as is used in several other places in Trac.

Changed 12 years ago by Ryan J Ollos

Attachment: TimeOpen2.png added

comment:3 Changed 12 years ago by Ryan J Ollos

(In [12003]) Refs #10330: Fixed out of range timestamp issue on Trac 0.12+ due to the change to storing timestamps in microsecond format. Additionally, the pretty_timedelta function is now used to display the time open parameter.

comment:4 Changed 12 years ago by Ryan J Ollos

(In [12004]) Refs #10330: The fix in [12003] didn't work with Trac 0.11 because the from_timestamp function doesn't exist in that release. The fix was over-complicated anyway. It is not necessary to convert the timestamp to a datetime object because the pretty_timedelta function can take a timestamp as input.

comment:5 Changed 12 years ago by Ryan J Ollos

Status: assignednew

comment:6 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.