Message4825
Long description, and resolution:
I'm running a 1.4.21 tracker on sqlite-backend and web frontend behind apache.
After importing a bunch of issues of my custom class, one item view failed with the following
templating error:
"""
<type 'exceptions.ValueError'>: second must be in 0..59
Debugging information follows
While evaluating the standard:'context/history' expression on line 61
"""
When dumping history on the command line I found one journal entry for the item with the
Date 2013-03-19.13:07:60.000.
Note the bad seconds value.
Now date.py has a check on the seconds value on line 277 as follows:
if str(self.second) == '60.0': self.second = 59.9
But when serialising the seconds field is stringified as '%06.3f'.
It is entirely possible that the line 277 check passes, but the format still yields '60.000', for
instance for a float like 59.9999.
The fix is simply to alter the line 277 check to either if '%06.3f'%self.second == '60.000': ...
or in this instance a direct float value check of "if self.second > 59.999: ..." would suffice.
Also, the corrected value when the check fails should probably be 59.999 instead of the
current 59.9. |
|
Date |
User |
Action |
Args |
2013-03-21 08:46:25 | nop-abc-se | set | recipients:
+ nop-abc-se |
2013-03-21 08:46:25 | nop-abc-se | set | messageid: <1363855585.57.0.0844007539669.issue2550802@psf.upfronthosting.co.za> |
2013-03-21 08:46:25 | nop-abc-se | link | issue2550802 messages |
2013-03-21 08:46:24 | nop-abc-se | create | |
|