Message265851
Hi,
I think that the problem exists also in python 3.5.1
After calling Py_Finalize and Py_Initialize I get the message "attribute of type 'NoneType' is not callable" on the datetime.strptime method.
Example:
from datetime import datetime
s = '20160505 160000'
refdatim = datetime.strptime(s, '%Y%m%d %H%M%S')
The first call works find but it crashes after the re initialization.
Workaround:
from datetime import datetime
s = '20160505 160000'
try:
refdatim = datetime.strptime(s, '%Y%m%d %H%M%S')
except TypeError:
import time
refdatim = datetime.fromtimestamp(time.mktime(time.strptime(s, '%Y%m%d %H%M%S')))
Can anyone confirm this bug? Can you tell me if this will be fixed for python 3.5/3.6/...?
All the other modules are working find after the re initialization but datetime.strptime. |
|
Date |
User |
Action |
Args |
2016-05-19 08:32:44 | Denny Weinberg | set | recipients:
+ Denny Weinberg, terry.reedy, amaury.forgeotdarc, ncoghlan, pitrou, ned.deily, Arfrever, palm.kevin, python-dev, pconnell, theDarkBrainer, isoschiz |
2016-05-19 08:32:43 | Denny Weinberg | set | messageid: <1463646763.96.0.980759988256.issue17408@psf.upfronthosting.co.za> |
2016-05-19 08:32:43 | Denny Weinberg | link | issue17408 messages |
2016-05-19 08:32:43 | Denny Weinberg | create | |
|