-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: pd.read_pickle not backwards compatible from v2.1.0 to v1.3.4 #55137
Comments
Support seems to be removed in #49316 Need to decide if we want to revert back or update the documentation |
Investigating this more, pandas 0.20.3 still works for this example but not pandas 1.3.4. Will add both examples in PR. |
Okay bisected and I see the bug with 1.3.4 starting at 15fd7d7 |
Is there an update on this issue? I am encountering the same bug |
Same bug here. |
Encountered it today. |
I'm affected, too. |
Same problem. 2.0.3 is the latest version that "works" for me... I've been checking this issue for weeks hoping for the best |
Facing the same issue |
I am still facing the same issue with pickles that were created using pandas 1.3.5 and display the same error messages when trying to be read using pandas 2.1.3 Precisely, pickles whose compression was |
A fix for this issue should be available when 2.1.4 is released (either end of the week or next week) |
Hi, I have a pickle file (uncertain which version it was created with, it's protocol version 4). When I try to open it with pandas 2.1.4, I get this error: When I load this with pandas 1.4.2 and dump it again, without changing anything, I can load it fine with pandas 2.1.4. |
Can you open a new issue? |
Of course: #56825 |
I downgrade pandas to 2.0.4, then it works without bugs |
I still have this problem in 2.2.2! I had to downgrade to 2.0.3 for pandas to be compatible. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The
read_pickle
method raises an error when attempting to read a file serialized withto_pickle
in pandas 1.3.4. No error is raised when using 2.0. toread_pickle
, or if the file is serialized with version >=1.4.The documentation states the method should be backwards compatible to pandas 0.20.3 provided the object was serialized with
to_pickle
(as in this case).Expected Behavior
Method should be backwards compatible, as per the documentation.
Installed Versions
INSTALLED VERSIONS
commit : f00efd0
python : 3.10.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-78-generic
Version : #85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 2.2.0dev0+225.gf00efd0344
numpy : 1.25.2
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 59.6.0
pip : 22.0.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader : None
bs4 : None
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
pandas : 1.3.4
numpy : 1.25.2
pytz : 2023.3.post1
dateutil : 2.8.2
pip : 22.0.2
setuptools : 59.6.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: