Skip to content
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: regression for 1.3.0: saving a dataframe with the "pickle" package using pandas 1.2.5 would not open with "pickle" again with pandas 1.3.0 #42345

Closed
2 of 3 tasks
shadiakiki1986 opened this issue Jul 2, 2021 · 9 comments · Fixed by #42394
Labels
IO Data IO issues that don't fit into a more specific label Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@shadiakiki1986
Copy link
Contributor

shadiakiki1986 commented Jul 2, 2021

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

I created a notebook here to illustrate the issue

https://colab.research.google.com/drive/1por9_BTeLYvZxNzLOBv_jIsFh44mnz4N?usp=sharing

Main error message:

/usr/local/lib/python3.7/dist-packages/pandas/_libs/internals.pyx in pandas._libs.internals.BlockManager.__cinit__()

TypeError: __cinit__() takes at least 2 positional arguments (0 given)

Problem description

Dataframes saved with pandas 1.2.5 and "pickle" are no longer loadable with pandas 1.3.0

Related to #42343

Expected Output

Output of pd.show_versions()

INSTALLED VERSIONS

commit : f00ed8f
python : 3.7.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.104+
Version : #1 SMP Sat Jun 5 09:50:34 PDT 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.3.0
numpy : 1.19.5
pytz : 2018.9
dateutil : 2.8.1
pip : 19.3.1
setuptools : 57.0.0
Cython : 0.29.23
pytest : 3.6.4
hypothesis : None
sphinx : 1.8.5
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : 4.2.6
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 5.5.0
pandas_datareader: 0.9.0
bs4 : 4.6.3
bottleneck : 1.3.2
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : 2.7.3
odfpy : None
openpyxl : 2.5.9
pandas_gbq : 0.13.3
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.4.18
tables : 3.4.4
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 1.1.0
xlwt : 1.3.0
numba : 0.51.2

@shadiakiki1986 shadiakiki1986 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 2, 2021
@marianabhinav
Copy link

Facing the same issue:
File "pandas/_libs/internals.pyx", line 572, in pandas._libs.internals.BlockManager.cinit
TypeError: cinit() takes at least 2 positional arguments (0 given)

My build made on 6th Feb 2021 passes with the same code.
I have been using the latest version of Pandas for my build.

@kuanhc96
Copy link

kuanhc96 commented Jul 5, 2021

I am also encountering this issue!

@benohead
Copy link

benohead commented Jul 5, 2021

Same here. Got the same error after updating to pandas 1.3 and reading data frames written with pickle and pandas 1.2.4. After downgrading back to 1.2.4, I could read the old data frames using pickle again.

@jotsif
Copy link

jotsif commented Jul 5, 2021

Same here

@stnatter
Copy link

stnatter commented Jul 5, 2021

same here. works with pandas=1.2.5

@jreback jreback added Regression Functionality that used to work in a prior pandas version IO Data IO issues that don't fit into a more specific label and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 5, 2021
@jreback jreback added this to the 1.3.1 milestone Jul 5, 2021
@jreback
Copy link
Contributor

jreback commented Jul 5, 2021

cc @jbrockmendel

@DAndresSanchez
Copy link

DAndresSanchez commented Jul 5, 2021

I am facing the same issue. I managed to make it work with pandas=1.2.4

@xianyuanliu
Copy link

Same here. Works with pandas=1.1.5.

@xianyuanliu
Copy link

I replace pickle.load with pandas.read_pickle and it seems fine. I still don't know whether they are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants