Extend / Fix the "NDB_PY2_UNPICKLE_COMPAT" flag#112
Extend / Fix the "NDB_PY2_UNPICKLE_COMPAT" flag#112kaansoral wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
'latin1' encoding is the fix to most of the common DecodeError's
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| return pickle.loads(value, encoding='bytes') | ||
| except: | ||
| return pickle.loads(value, encoding='latin1') | ||
| raise |
There was a problem hiding this comment.
Is encoding='bytes' ever what you would want here anyway? I would maybe try 'latin1' first, it's still going to mess up unicode strings but it's probably better for the common case of datetime objects.
|
I filed issue #103 asking basically "what is this thing" and got no responses so good luck ever getting this merged :/ If you don't want to use a modified appengine lib, you could try something like this (YMMV, no guarantees) |
|
Thank you, this was the response to my second issue tracker issue: https://issuetracker.google.com/issues/322838721 I do share the same sentiment with you, I doubt this will be fixed for others too, I suspect we all push the wagon ourselves at this point those who are left Have no idea what |
'latin1' encoding is the fix to most common fix of the DecodeError's, throughout the docs it's the adopted fix as well, which can be seen here: https://cloud.google.com/appengine/docs/standard/python3/services/access
After this fix, I believe the "NDB_PY2_UNPICKLE_COMPAT" flag should be added to the official docs as well
Fixes #111