Ticket #4670 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: anonymous Assigned to: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: critical Keywords:
Cc: samy-delux@gmx.de, chris@chrisweldon.net, trachacks@asgeo1.com 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

debug.log (6.1 kB) - added by samy-delux@gmx.de on 02/20/09 14:23:33.
trac_debug_log.txt (2.1 kB) - added by asgeo1 on 08/25/09 15:43:02.
trac debug log (asgeo1)

Change History

02/20/09 14:22:42 changed by samy-delux@gmx.de

  • release changed from 0.12 to 0.11.
  • severity changed from normal to major.

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

02/20/09 14:23:33 changed by samy-delux@gmx.de

  • attachment debug.log added.

02/22/09 22:54:40 changed by chris@chrisweldon.net

I am also recieving the same error message.

02/23/09 16:40:09 changed by bobbysmith007

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.

02/23/09 16:47:33 changed by bobbysmith007

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

02/23/09 16:50:52 changed by bobbysmith007

Also, what versions of python are you using?

02/23/09 16:54:04 changed by bobbysmith007

  • cc set to samy-delux@gmx.de, chris@chrisweldon.net.

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

Thanks

02/23/09 16:59:30 changed 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!

02/23/09 19:37:26 changed 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 :-(.

03/02/09 15:19:53 changed by bobbysmith007

This is fixed in Trac now.

03/02/09 15:20:01 changed by bobbysmith007

  • status changed from new to closed.
  • resolution set to fixed.

07/05/09 07:05:39 changed by mike

  • severity changed from major to critical.

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.

08/25/09 15:43:02 changed by asgeo1

  • attachment trac_debug_log.txt added.

trac debug log (asgeo1)

(follow-ups: ↓ 13 ↓ 15 ) 08/25/09 15:45:16 changed by asgeo1

  • cc changed from samy-delux@gmx.de, chris@chrisweldon.net to samy-delux@gmx.de, chris@chrisweldon.net, trachacks@asgeo1.com.
  • status changed from closed to reopened.
  • resolution deleted.

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.

(in reply to: ↑ 12 ) 08/28/09 16:38:16 changed by bobbysmith007

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.

08/28/09 17:11:40 changed by bobbysmith007

  • status changed from reopened to closed.
  • resolution set to fixed.

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

(in reply to: ↑ 12 ) 08/28/09 17:14:26 changed by bobbysmith007

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


Add/Change #4670 (Trac detected an internal error: ValueError: invalid literal for int() with base 10: '')




Change Properties
Action