Edgewall Software

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8070 closed defect (fixed)

[PATCH] "ValueError: invalid literal for int()" when running custom query

Reported by: John A. Barbuto <jbarbuto@…> Owned by: jbarbuto@…
Priority: normal Milestone: 0.11.4
Component: ticket system Version: 0.11-stable
Severity: normal Keywords:
Cc: jbarbuto@… Branch:
Release Notes:
API Changes:
Internal Changes:


We were getting an internal error on custom queries:

File "/usr/lib/python2.4/site-packages/Trac-", line 432, in _dispatch_request
File "/usr/lib/python2.4/site-packages/Trac-", line 204, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/Trac-", line 823, in process_request
  return self.display_html(req, query)
File "/usr/lib/python2.4/site-packages/Trac-", line 876, in display_html
  tickets = query.execute(req, db)
File "/usr/lib/python2.4/site-packages/Trac-", line 306, in execute
  val = bool(int(val))

The ValueError exception is missed since multiple exceptions in an except clause need to be contained in a tuple. The attached patch against 0.11-stable fixes the problem.

Attachments (1)

query.py.patch (502 bytes ) - added by John A. Barbuto <jbarbuto@…> 11 years ago.

Download all attachments as: .zip

Change History (5)

by John A. Barbuto <jbarbuto@…>, 11 years ago

Attachment: query.py.patch added

comment:1 by John A. Barbuto <jbarbuto@…>, 11 years ago

Cc: jbarbuto@… added

comment:2 by Remy Blank, 11 years ago

Milestone: 0.11.4
Owner: set to Remy Blank

Yes, good catch. Thanks!

comment:3 by Remy Blank, 11 years ago

Resolution: fixed
Status: newclosed

Patch applied in [7909].

comment:4 by Remy Blank, 11 years ago

Owner: changed from Remy Blank to jbarbuto@…

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain jbarbuto@….
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jbarbuto@… 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.