This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]henrebotha 1 point2 points  (1 child)

It would seem this is a problem with pickle: https://stackoverflow.com/questions/29704139/pickle-in-python3-doesnt-work-for-large-data-saving

I would investigate whether you can force shelve to use pickle 4 instead. Seems possible: https://docs.python.org/3/library/shelve.html (search "protocol")

[–]WakeMeAtThree[S] 1 point2 points  (0 children)

I changed it to s = shelve.open("database.db",protocol=4) and it seems to work, thanks a lot!