Displaying certain issues fails with "Templating error"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
roundup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: roundup
Since lucid (and still in maverick, but not in karmic), one issue in our internal issue tracker fails to display, apparently due to a date that is messed up in some way. I also can't edit it via the command-line admin interface, so in the end I had to edit /usr/lib/
--- /home/helmert/
+++ /usr/lib/
@@ -148,6 +148,8 @@
def _utc_to_
TZ = get_timezone(tz)
frac = S - int(S)
+ if S < 0: S = 0 ## [Malte]
+ if S > 59: S = 59 ## [Malte]
dt = datetime.
y,m,d,H,M,S = dt.astimezone(
S = S + frac
I don't know why the date is corrupted, but the issue tracker is not special in any way (classic template, no external tools messing with it, no customizations).
This only happens for very few issues, but with those it happens consistently.
Here's the traceback that is emailed to the admins:
Templating Error
*<type 'exceptions.
Debugging information follows
1. A problem occurred in your template "issue.item.html".
Full traceback:
Traceback (most recent call last):
File "/usr/lib/
result = pt.render(self, None, None, **args)
File "/usr/lib/
getEngine(
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
return self.no_tag(start, program)
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
self.
File "/usr/lib/
return self.no_tag(start, program)
File "/usr/lib/
self.
File "/usr/lib/
handlers[
File "/usr/lib/
xlated_msgid = self.translate(
File "/usr/lib/
msgid, i18ndict, default=default)
File "/usr/lib/
target_
File "/usr/lib/
_msg = TALInterpreter.
File "/usr/lib/
subst = ustr(mapping[var])
File "/usr/lib/
return self.plain()
File "/usr/lib/
return str(self.
File "/usr/lib/
self.hour, self.minute, self.second, offset)
File "/usr/lib/
dt = datetime.
ValueError: second must be in 0..59
Hmmm, Somehow the indentation in the diff is messed up. The "if" lines should of course be indented to the same depth as the preceding lines.