-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: read_pickle fallback to encoding=latin_1 upon a UnicodeDecodeError #32055
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
REGR: read_pickle fallback to encoding=latin_1 upon a UnicodeDecodeError #32055
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pedroreys generally looks good. couple of suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; question on the whastnew change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedroreys thanks for the changes. lgtm ex @WillAyd comment
When a reading a pickle with MultiIndex columns generated in py27 `pickle_compat.load()` with `enconding=None` would throw an UnicodeDecodeError when reading a pickle created in py27. Now, `read_pickle` catches that exception and fallback to use `latin-1` explicitly.
Cleanup the code so that it only has a single catch for UnicodeDecodeError
Co-Authored-By: Simon Hawkins <[email protected]>
5757a4b
to
08c007d
Compare
LGTM |
…latin_1 upon a UnicodeDecodeError
Thanks @pedroreys ! |
…on a UnicodeDecodeError (#32154) Co-authored-by: Pedro Reys <[email protected]>
…ror (pandas-dev#32055) When a reading a pickle with MultiIndex columns generated in py27 `pickle_compat.load()` with `enconding=None` would throw an UnicodeDecodeError when reading a pickle created in py27. Now, `read_pickle` catches that exception and fallback to use `latin-1` explicitly.
When a reading a pickle with MultiIndex columns generated in py27
pickle_compat.load()
withenconding=None
would throw an UnicodeDecodeErrorwhen reading a pickle created in py27. Now,
read_pickle
catches that exception andfallback to use
latin-1
explicitly.read_pickle
when loading a DataFrame with MultiIndex columns from a pickle created in py27 #31988black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff