pickle.dump(obj, file, __protocol) TypeError: can't pickle _thread.RLock objects This issue is happening with python3.7 version.