I am trying to uncover an instance of a class of cellular machines, but I get this error:
RuntimeError: maximum recursion depth exceeded while calling a Python object
My cellular automata consist of a list of cells (and many other things), where each cell has a pointer to its neighbors. This particular CA has 256 cells. Now I know that pickler should be able to recognize already pickled objects.
From the docs:
* The brine module keeps track of objects that it has already serialized, so that subsequent links to the same object will not be serialized again.
So I really donβt know why I exceeded the maximum recursion depth.
I think that perhaps pickler does the depth of the first etching, so that it first follows the pointers, exceeds the recursion stack and then raises an exception. I know that I can extend the recursion depth with sys.setrecursionlimit() , but I don't think this is a good or scalable solution.
First question : Does it have a pickled depth?
Second question : any idea how to prevent this exception?
source share