Opened 9 years ago
Closed 9 years ago
#12217 closed defect (cantfix)
ValueError: invalid literal for long() with base 10: 'Tue Sep 22 20:01:44 COT 2015'
Reported by: | mgarizao | Owned by: | Ryan J Ollos |
---|---|---|---|
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 POST operation on /admin/ticket/milestones
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'__FORM_TOKEN': u'75ae3ced9efd698a17fea319', 'cat_id': u'ticket', 'panel_id': u'milestones', 'path_info': None, 'remove': u'Quitar seleccionados', 'sel': u'Libre1'}
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
System Information
Trac | 1.0.1
|
Babel | 1.3
|
Docutils | 0.11
|
Genshi | 0.7 (with speedups)
|
mod_python | 3.3.1
|
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
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 214, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.7/dist-packages/trac/admin/web_ui.py", line 125, in process_request path_info) File "/usr/lib/python2.7/dist-packages/trac/ticket/admin.py", line 55, in render_admin_panel return self._render_admin_panel(req, cat, page, version) File "/usr/lib/python2.7/dist-packages/trac/ticket/admin.py", line 320, in _render_admin_panel mil.delete(author=req.authname) File "/usr/lib/python2.7/dist-packages/trac/ticket/model.py", line 1019, in delete ticket = Ticket(self.env, tkt_id, db) File "/usr/lib/python2.7/dist-packages/trac/ticket/model.py", line 82, in __init__ self._fetch_ticket(tkt_id) File "/usr/lib/python2.7/dist-packages/trac/ticket/model.py", line 127, in _fetch_ticket self.values[field] = from_utimestamp(value) File "/usr/lib/python2.7/dist-packages/trac/util/datefmt.py", line 113, in from_utimestamp return _epoc + timedelta(microseconds=long(ts) or 0) ValueError: invalid literal for long() with base 10: 'Tue Sep 22 20:01:44 COT 2015'
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
follow-up: 4 comment:2 by , 9 years ago
Milestone: | → 1.2 |
---|---|
Resolution: | cantfix |
Status: | closed → reopened |
I'm going to look into raising an exception if the when
parameter is invalid in calls to Ticket.insert
and Ticket.save_changes
.
comment:3 by , 9 years ago
Owner: | set to |
---|---|
Status: | reopened → assigned |
comment:4 by , 9 years ago
Milestone: | 1.2 |
---|---|
Resolution: | → cantfix |
Status: | assigned → closed |
Replying to Ryan J Ollos:
I'm going to look into raising an exception if the
when
parameter is invalid in calls toTicket.insert
andTicket.save_changes
.
An exception should be raised when the datetime
object is converted to a timestamp:
Also, I can't see any issues with the current version of XmlRpcPlugin since it just makes calls to Ticket.insert
and Ticket.save_changes
: browser:xmlrpcplugin/trunk/tracrpc/ticket.py@14744:175,221,259#L159.
If you have any more information about how the data was inserted into your database please let us know.
InstallationIssue: You have some incorrectly formatted data in your database. Ticket creation and modified time are stored as integer values representing microsecond POSIX timestamps, not date strings. Maybe this is due to creating tickets through the th:XmlRpcPlugin?