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