PyEval_AcquireThread complains if the current thread state is not NULL