Modify ↓
#12307 closed defect (cantfix)
ValueError: invalid literal for long() with base 10: 'Mon Jan 04 10:46:26 JST 2016'
Reported by: | user1 | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 1.0.1 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /report/1
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'id': u'1'}
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
System Information
Trac | 1.0.1
|
Babel | 1.3
|
Docutils | 0.11
|
Genshi | 0.7 (with speedups)
|
mod_wsgi | 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
|
Pygments | 1.6
|
pysqlite | 2.6.3
|
Python | 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2]
|
pytz | 2012c
|
RPC | 1.1.4
|
setuptools | 3.3
|
SQLite | 3.8.2
|
jQuery | 1.7.2
|
Enabled Plugins
IniAdmin | 0.3
|
TracAccountManager | 0.5dev
|
TracHTTPAuth | 1.1
|
TracXMLRPC | 1.1.4
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 233, in dispatch content_type) File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 1015, in render_template encoding='utf-8') File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 184, in render return encode(generator, method=method, encoding=encoding, out=out) File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 58, in encode for chunk in iterator: File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 350, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 829, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 669, in __call__ for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 774, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File "/usr/lib/python2.7/dist-packages/genshi/output.py", line 594, in __call__ for ev in stream: File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 289, in _ensure for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 289, in _ensure for event in stream: File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 1152, in _strip_accesskeys for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 289, in _ensure for event in stream: File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 1141, in _generate for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 618, in _include for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line 378, in _match ctxt, start=idx + 1, **vars): File "/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line 378, in _match ctxt, start=idx + 1, **vars): File "/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line 326, in _match for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 558, in _flatten for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 289, in _ensure for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/path.py", line 588, in _generate subevent = next() File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 618, in _include for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line 315, in _strip event = next() File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 558, in _flatten for kind, data, pos in stream: File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 289, in _ensure for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/path.py", line 588, in _generate subevent = next() File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 618, in _include for event in stream: File "/usr/lib/python2.7/dist-packages/genshi/template/markup.py", line 315, in _strip event = next() File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 578, in _flatten result = _eval_expr(data, ctxt, vars) File "/usr/lib/python2.7/dist-packages/genshi/template/base.py", line 289, in _eval_expr retval = expr.evaluate(ctxt) File "/usr/lib/python2.7/dist-packages/genshi/template/eval.py", line 178, in evaluate return eval(self.code, _globals, {'__data__': data}) File "/usr/lib/python2.7/dist-packages/trac/ticket/templates/report_view.html", line 165, in <Expression u"format_date(from_utimestamp(long(cell.value))) if cell.value != '' else '--'"> <td class="date" py:attrs="td_attrs">${format_date(from_utimestamp(long(cell.value))) if cell.value != '' else '--'} ValueError: invalid literal for long() with base 10: 'Mon Jan 04 10:46:26 JST 2016'
Attachments (0)
Note:
See TracTickets
for help on using tickets.
You stored a string rather than a timestamp in the
date
,created
ormodified
column. If report {1} hasn't been modified, then it must be thecreated
column.Please let us know if you have more information on how you managed to insert this data into the database. See also #12217.