Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum recursion depth exceeded while trying to store nested dictionaries #118

Open
kuriringohankamehameha opened this issue Aug 24, 2020 · 1 comment
Labels
need info Need more information for reproduce

Comments

@kuriringohankamehameha
Copy link

kuriringohankamehameha commented Aug 24, 2020

It seems that sqlitedict fails to pickle relatively nested dictionaries successfully. Sometimes, I get this error when trying to store a dictionary (around 5 MB) with a nesting level of around 3-4 in Python3.6.

File "/home/user/.local/lib/python3.6/site-packages/sqlitedict.py", line 253, in __setitem__
    self.conn.execute(ADD_ITEM, (key, self.encode(value)))
  File "/home/user/.local/lib/python3.6/site-packages/sqlitedict.py", line 100, in encode
    return sqlite3.Binary(dumps(obj, protocol=PICKLE_PROTOCOL))
RecursionError: maximum recursion depth exceeded while calling a Python object

Is it just me, or can anyone else verify that this happens during pickling? Any workarounds for this issue until then?

Thanks

@piskvorky
Copy link
Owner

piskvorky commented Aug 24, 2020

There might be some recursion limitation in pickle. It's suspicious that would happen at a nesting level of 3-4 levels though; I'd expect any such limits to be orders of magnitude deeper.

If you post a minimal reproducible example, and a full stack trace, we'll have a look.

@mpenkov mpenkov added the need info Need more information for reproduce label Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info Need more information for reproduce
Projects
None yet
Development

No branches or pull requests

3 participants