Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#4670 closed defect (fixed)

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

Reported by: anonymous Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: critical Keywords:
Cc: samy-delux@…, chris@…, trachacks@… Trac Release: 0.11

Description

In the new trac release 0.12 all management reports result in the following error: Trac detected an internal error: ValueError: invalid literal for int() with base 10:

Most recent call last: File "D:\Programme\Python\lib\site-packages\trac-0.12dev_r7906-py2.5.egg\trac\ticket\templates\report_view.html", line 168, in <Expression u"cell.value != 'None' and format_datetime(int(cell.value)) or '--'"> Code fragment:

<hr py:if="fullrow"/> </td> </py:when> <py:when test="col == 'datetime'">

<td class="date" py:attrs="td_attrs">${cell.value != 'None' and format_datetime(int(cell.value)) or '--'}

<hr py:if="fullrow"/> </td> </py:when> <py:when test="col == 'description'">

Local variables:

Name Value data [{'col': u'datetime'}, {'cell': {'header': {'asc': False, 'hidden': False, ... File "D:\Programme\Python\lib\site-packages\trac-0.12dev_r7906-py2.5.egg\trac\ticket\templates\report_view.html", line 168, in <Expression u"cell.value != 'None' and format_datetime(int(cell.value)) or '--'">

<td class="date" py:attrs="td_attrs">${cell.value != 'None' and format_datetime(int(cell.value)) or '--'}

Tickets can be entered, however no management report can be used. All exhibit this issue.

The TimingAndEstimationPlugin is broken on 0.12 r7906.

Attachments (2)

debug.log (6.1 KB) - added by samy-delux@… 9 years ago.
trac_debug_log.txt (2.1 KB) - added by asgeo1 8 years ago.
trac debug log (asgeo1)

Download all attachments as: .zip

Change History (17)

comment:1 Changed 9 years ago by samy-delux@…

Severity: normalmajor
Trac Release: 0.120.11

The same error happens in version 0.11.3. I attached a Debug log!

Changed 9 years ago by samy-delux@…

Attachment: debug.log added

comment:2 Changed 9 years ago by chris@…

I am also recieving the same error message.

comment:3 Changed 9 years ago by Russ Tyndall

Are you sure it is not just the billing reports that are failing (as opposed to the Ticket/Hour Reports)? If it is all the reports can you post a second log of where it is failing on the Ticket/Hour Reports.

I have opened http://trac.edgewall.org/ticket/8086 to address this issue.

Thanks.

comment:4 Changed 9 years ago by Russ Tyndall

If it is just a billing reports, I imagine that returning datetime('now','localtime') in the total row instead of would fix it.

comment:5 Changed 9 years ago by Russ Tyndall

Also, what versions of python are you using?

comment:6 Changed 9 years ago by Russ Tyndall

Cc: samy-delux@… chris@… added; anonymous removed

I added y'all to the cc list to get your feedback on this item.

Thanks

comment:7 Changed 9 years ago by anonymous

Only the Billing Reports are failing. The Ticket/Hour Repors work fine! We are using python version 2.5.2 and the sqlite backend!

comment:8 Changed 9 years ago by anonymous

We are using python 2.5 on Windows.

Neither the billing report nor the ticket/hour reports worked. However a change in trac\ticket\templates\report_view.html line 168 replacing ${cell.value != 'None' and format_datetime(int(cell.value)) or '--'} with ${cell.value != 'None' and cell.value != format_datetime(int(cell.value)) or '--'} fixed the issue for me.

Not sure if the fix is globally applicable :-(.

comment:9 Changed 8 years ago by Russ Tyndall

This is fixed in Trac now.

comment:10 Changed 8 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

comment:11 Changed 8 years ago by mike

Severity: majorcritical

I am using a hosted version of Trac and have no control over the version we're using. It's currently on version 0.11.4, and I am still seeing this problem for Billing Reports. Could the recent changes have caused versions of Trac older than 0.12 to break?

Thanks.

Changed 8 years ago by asgeo1

Attachment: trac_debug_log.txt added

trac debug log (asgeo1)

comment:12 Changed 8 years ago by asgeo1

Cc: trachacks@… added
Resolution: fixed
Status: closedreopened

I'm using 0.11.5 and are still receiving this error when I view any of the time management reports apart from Ticket Work Summary.

Is this the same issue? If, so it has not been fixed?

I have added a debug log.

comment:13 in reply to:  12 Changed 8 years ago by Russ Tyndall

Replying to mike:

I am using a hosted version of Trac and have no control over the version we're using. It's currently on version 0.11.4, and I am still seeing this problem for Billing Reports. Could the recent changes have caused versions of Trac older than 0.12 to break?

Thanks.

It was a bug in one of the trac template files, so if you are unable to update your trac install this could be problematic. You might try writing your hosting company and point them to the trac error you are experiencing asking them to update. If that doesnt work, I believe you can craft a plugin that will allow you to overwrite one of the default trac templates with one of your own, though I leave it to you to do that research.

Alternatively it seems that someone else is having this issue stemming from another location in a newer version of trac (see below).

Replying to asgeo1:

I'm using 0.11.5 and are still receiving this error when I view any of the time management reports apart from Ticket Work Summary.

Is this the same issue? If, so it has not been fixed?

I have added a debug log.

This seems to be a different issue entirely (though with the same error message). Looking into this now.

comment:14 Changed 8 years ago by Russ Tyndall

Resolution: fixed
Status: reopenedclosed

(In [6451]) close #4670 found a problem with ticket_policy that would cause it to fail on total rows of reports

comment:15 in reply to:  12 Changed 8 years ago by Russ Tyndall

Replying to asgeo1:

I'm using 0.11.5 and are still receiving this error when I view any of the time management reports apart from Ticket Work Summary.

Is this the same issue? If, so it has not been fixed?

I have added a debug log.

I think I found the problem you were experiencing and fixed it. Hope this helps and thanks for the bug report.

Please reopen if you continue to experience this problem after you have installed the new update

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.