Wednesday, March 25, 2009

fail

You may have noticed that the Viktorfeed is down. The server it runs on was updated last night to the new version of Debian, including a new Python installation, and Something Went Wrong involving the conversion of strings to struct_time values. If you do this on my laptop:
Python 2.5.1 (r251:54863, Jan 10 2008, 18:01:57)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> timeinput = '25032009210500'
>>> t = time.strptime(timeinput, "%d %m %Y %H %M %S")

you get this:
>>> print t
(2009, 3, 25, 21, 5, 0, 2, 84, -1)

but if you do this on the server:
Python 2.5.2 (r252:60911, Jan 4 2009, 21:59:32)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> import time
> timeinput = '25032009210500'
> t = time.strptime(timeinput, "%d %m %Y %H %M %S")


Ada Lovelace appears in the mirror...and she's *not happy*.

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.5/_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format: data=25032009210500 fmt=%d %m %Y %H %M %S


I'll fix it as soon as I can.

Update: We're back. The problem related to Bug #1730389, and when that was fixed it turned out email.utils.formatdate() had also changed, wanting floats only rather than struct_time objects, and of course I could go back to using Sqlite3 as I did developing the thing rather than pysqlite2.

No comments:

kostenloser Counter