Edgewall Software
Modify

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 Ryan J Ollos, 9 years ago

Resolution: cantfix
Status: newclosed

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?

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Ryan J Ollos, 9 years ago

Milestone: 1.2
Resolution: cantfix
Status: closedreopened

I'm going to look into raising an exception if the when parameter is invalid in calls to Ticket.insert and Ticket.save_changes.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:3 by Ryan J Ollos, 9 years ago

Owner: set to Ryan J Ollos
Status: reopenedassigned

in reply to:  2 comment:4 by Ryan J Ollos, 9 years ago

Milestone: 1.2
Resolution: cantfix
Status: assignedclosed

Replying to Ryan J Ollos:

I'm going to look into raising an exception if the when parameter is invalid in calls to Ticket.insert and Ticket.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.

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'.
to The owner will be changed from Ryan J Ollos 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.