When Runtime Error: maximum recursion depth exceeded while pickling an object appears in python pickle

When saving an object with python pickle

RuntimeError: maximum recursion depth exceeded while pickling an object

What to do if

import sys
sys.setrecursionlimit(10000)

The numerical value of the argument is appropriate. In my case, when I saved the 4.4 million word trie tree, I was able to save it with the above numerical values.

Recommended Posts

When Runtime Error: maximum recursion depth exceeded while pickling an object appears in python pickle
Resolved an error when putting pygame in python3 on raspberry pi
Precautions when pickling a function in python
When Python "Syntax Error: Non-ASCII character ~" appears
[Python] I want to know the variables in the function when an error occurs!
I got an error when I put opencv in python3 with Raspberry Pi [Remedy]
[python] What to do when an error occurs in send_keys of headless chrome
When codec can't decode byte appears in python
Error when trying to install psycopg2 in Python
Behavior when saving python datetime object in MongoDB
Insert an object inside a string in Python
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
When Attribute Error: Can't get attribute'class name' on <module'__main__' (built-in)> appears when loading python pickle
What to do if you get an error when importing matplotlib in Python (Mac)