When using Python to automate your work, threading is one thing you need to know of. I’ve got into a problem with threading when parsing time. To be exact:
datetime.datetime.strptime() function was not thread-safe. Luckily, I found a solution on StackOverflow.
This is how the problem occurred:
1 2 3 4 5 6 7 8 9
Fixing it was pretty straightforward. Just make a dummy call on strptime() before creating a thread:
1 2 3