Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#7965 closed defect (duplicate)

Trac 0.11.2.1 : attachment report problem with int() basic function.

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: attachment Version: 0.11.2.1
Severity: normal Keywords: Attachment report.
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

On using [Create report] function in [View tickets] context, the tool crashes in basic int() function.

It seems to be related to date procedures (here are the results for several requirements:

SELECT * FROM attachment WHERE ROWID=<number> ):
Trac detected an internal error: 
ValueError: invalid literal for int() with base 10: '1194872562.89'

Trac detected an internal error: 
ValueError: invalid literal for int() with base 10: '1194872590.22'

Trac detected an internal error: 
ValueError: invalid literal for int() with base 10: '1194885529.52'

Trac detected an internal error: 
ValueError: invalid literal for int() with base 10: '1194949397.94'

Trac detected an internal error: 
ValueError: invalid literal for int() with base 10: '1195669072.61.

The bug was also observed in 0.9 version. The numbers are probably an internal coding of date attributes as was observed when comparing dates as they appeared to the user interface with those logged with [Download] in text files command.

The cfg used is :

Trac:
0.11.2.1
  Python:
2.5 (r25:51908, Dec 11 2006, 18:44:13) [GCC 4.1.2 20061110 (prerelease) (4.1.2-0.20061110.1mdv2007.1)]
  setuptools:
0.6c3
  SQLite:
3.3.8
  pysqlite:
2.2.0
  Genshi:
0.5.1
  jQuery:
1.2.6

Attachments (0)

Change History (4)

comment:1 by anonymous, 15 years ago

By modifying: /usr/lib/python2.5/site-packages/Trac-0.11.2.1.py2.5egg/trac/ticket/templates/report_view.html:114 it is possible to make the [Create report] command work without crashing (at line 114, the condition with format_time() is simplified).

comment:2 by Christian Boos, 15 years ago

Component: generalattachment
Description: modified (diff)
Resolution: duplicate
Status: newclosed

You may have non-int values in your db for some of the attachment fields. If you're upgrading from 0.9 this can happen (#3557).

Alternatively, this could be a duplicate of #7329. At least have a look there for how to convert the problematic fields.

comment:3 by anonymous, 15 years ago

Resolution: duplicate
Status: closedreopened

comment:4 by Remy Blank, 15 years ago

Resolution: duplicate
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.