Skip to content

Conversation

@atkinson
Copy link

This was falling in a mess on Postgres when the object being pickled contained encodings other than ASCII.

There's a discrepancy between the docs and reality which you can read about here: http://bugs.python.org/issue2980

I worked around by encoding to base64 before storing the picked object in the db, and then base64 decode on the way out.

Also elected to use the best available decoder seeing as there is no benefit to using the ASCII one (which doesn't guarantee ASCII).

pirandig and others added 3 commits April 23, 2013 16:09
…aranteed to be ASCII, (contradictory to the official docs). Encoding to base64 is necessary in case there are other non-ASCII encodings embedded in the object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants