'module' object has no attribute '_strptime' with several threads Python
The problem is described in a mailing list message "threading bug in strptime".
datetime.strptime
has a problem with Python 2's threading
module. The workaround suggested there seems to be to invoke strptime = datetime.datetime.strptime
before any threads are started.
I can confirm that the issue is related to multithreading, and it happens to me occasionally when I use datetime.datetime.strptime
in combination with the ThreadPool
module.
I was able to fix this in my script by importing the "missing" module as follows:
import _strptime