pickle recursion error
We always had this issue
RecursionError: maximum recursion depth exceeded while pickling an object
That we resolved with this workaround
# This workaround is needed to allow pickle to write the file, don't know yet about its risks sys.setrecursionlimit(10000)
The problem is real, and is that
- we store the module object inside Procedure objects, but then we store Main as a Procedure inside the Module, causing great recursion levels.
- we store the module object inside Variable objects, and then we store variables inside Module
This has to be solved. The first one is simple, since most of the times we use just the info about the name of the module, the second is a mess.