-
-
Notifications
You must be signed in to change notification settings - Fork 19.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
simonjayhawkins
left a comment
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.
WillAyd
left a comment
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
simonjayhawkins
left a comment
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 <simonjayhawkins@gmail.com>
5757a4b to
08c007d
Compare
|
LGTM |
…latin_1 upon a UnicodeDecodeError
|
Thanks @pedroreys ! |
…on a UnicodeDecodeError (#32154) Co-authored-by: Pedro Reys <pedroreys@gmail.com>
…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=Nonewould throw an UnicodeDecodeErrorwhen reading a pickle created in py27. Now,
read_picklecatches that exception andfallback to use
latin-1explicitly.read_picklewhen loading a DataFrame with MultiIndex columns from a pickle created in py27 #31988black pandasgit diff upstream/master -u -- "*.py" | flake8 --diff