Folks,
when I try to run the scanner it breaks after a few seconds.
Python complains about this line (175) from model.py:
match_dict['month'] = dup.parse('%s %s' % (match_dict['month'],
match_dict['year']))
I am able to repeat this problem in python's interactive interpreter:
>> import dateutil.parser as dup
>> dup.parse('January 2009')
datetime.datetime(2009, 1, 30, 0, 0)
>> dup.parse('February 2009')
Traceback (most
recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python2.5/site-packages/python_dateutil-1.4.1-py2.5.egg/dateutil/parser.py",
line 697, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File
"/usr/local/lib/python2.5/site-packages/python_dateutil-1.4.1-py2.5.egg/dateutil/parser.py",
line 310, in parse
ret = default.replace(**repl)
ValueError: day is out of range for month
>> dup.parse('March 2009')
datetime.datetime(2009,
3, 30, 0, 0)
It's not that hard to guess that dateutil.parser
breaks down when it's being asked for a date that
doesn't exist in the calendar.
This bug is not related to ekg's code itself, but
I am curious if you see it too.
Cheers,
--
Wojtek Walczak,
http://tosh.pl/gminick/