UXsim
UXsim copied to clipboard
RecursionError: maximum recursion depth exceeded when pickling
I would like to save the World object to analyze later, but when saving with either:
model1.uw.save("model1_uw.pickle")
or
import sys
sys.setrecursionlimit(1000000) # Example: Set the limit to 1500, adjust as needed
with open("model_instance.pickle", "wb") as f:
pickle.dump(model1.uw, f, protocol=pickle.HIGHEST_PROTOCOL)
It throws a RecursionError: maximum recursion depth exceeded message.
Reproduce
I don't have a minimal reproducible example yet, buy it can be observed by running model.py in this repo and adding model1.uw.save("model1_uw.pickle") at the bottom. The error can also be observed in this CI run.