[Twisted-Python] Strange error when using strptime within a nevow application
Franz Zieher
franz.zieher at gmail.com
Tue Oct 31 17:26:48 MST 2006
I've experiencing a very strange error when using strptime for populating a
'formal' form.
If I run the code segment with strptime in ipython it can succesfully
transform
'12-10-06' with '%d-%m-%Y' into a time tuple!
With nevow I get the following exception:
----------------------------------------------------------
2006/11/01 01:18 W. Europe Standard Time [-] Log opened.
2006/11/01 01:18 W. Europe Standard Time [-] twistd
2.4.0(D:\Python24\python.exe
2.4.3) starting up
2006/11/01 01:18 W. Europe Standard Time [-] reactor class: <class '
twisted.internet.selectreactor.SelectReactor'>
2006/11/01 01:18 W. Europe Standard Time [-]
nevow.appserver.NevowSitestarting on 8000
2006/11/01 01:18 W. Europe Standard Time [-] Starting factory <
nevow.appserver.NevowSite instance at 0x02797A30>
2006/11/01 01:18 W. Europe Standard Time [HTTPChannel,0,127.0.0.1]
127.0.0.1- - [01/Nov/2006:00:18:24 +0000] "GET / HT
P/1.1" 200 7872 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1)
Gecko/20061010 Firefox/2.0"
2006/11/01 01:18 W. Europe Standard Time [HTTPChannel,0,127.0.0.1]
(NAME,DIR): ('newChild', None)
2006/11/01 01:18 W. Europe Standard Time [HTTPChannel,0,127.0.0.1]
IRemainingSegments: ('newChild',)
2006/11/01 01:18 W. Europe Standard Time [HTTPChannel,0,127.0.0.1] Unhandled
error in Deferred:
2006/11/01 01:18 W. Europe Standard Time [HTTPChannel,0,127.0.0.1] Traceback
(most recent call last):
File "d:\python24\lib\site-packages\twisted\internet\defer.py",
line 307, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "build\bdist.win32\egg\formal\form.py", line 617, in
locateForm
File "d:\python24\lib\site-packages\twisted\internet\defer.py",
line 191, in addCallback
callbackKeywords=kw)
File "d:\python24\lib\site-packages\twisted\internet\defer.py",
line 182, in addCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "d:\python24\lib\site-packages\twisted\internet\defer.py",
line 307, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "build\bdist.win32\egg\formal\form.py", line 617, in <lambda>
File "build\bdist.win32\egg\formal\form.py", line 567, in
formFactory
File "e:\data\iCAE\python\icaeForms.py", line 92, in form_instance
eval('self.%s(form)' % tag)
File "<string>", line 0, in ?
File "e:\data\iCAE\python\icaeForms.py", line 128, in project
print strptime('10-12-06','%d-%m-%Y')[0]
File "D:\Python24\lib\_strptime.py", line 269, in ?
_TimeRE_cache = TimeRE()
File "D:\Python24\lib\_strptime.py", line 188, in __init__
self.locale_time = LocaleTime()
File "D:\Python24\lib\_strptime.py", line 74, in __init__
self.__calc_weekday()
File "D:\Python24\lib\_strptime.py", line 94, in __calc_weekday
a_weekday = [calendar.day_abbr[i].lower() for i in range(7)]
exceptions.AttributeError: 'module' object has no attribute
'day_abbr'
Any idea what that could be?
Thanks
Franz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20061101/f677aaae/attachment.html>
More information about the Twisted-Python
mailing list