While using:
with open("data_file.pickle", "rb") as pfile:
raw_data = pickle.load(pfile)
I get the error:
AttributeError: Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' from '/opt/conda/lib/python3.8/site-packages/pandas/_libs/internals.cpython-38-x86_64-linux-gnu.so'>
Another answer to a similar question suggests checking the version of pickle I am using. It is the same on my machine, where I developed the code and on server, where I am running the code. I have searched everywhere with no answers. Please help.
pandas v1.4.0
and serialized it as hdf5 file. Then downgraded pandas topandas v1.1.5
serialized again using pickle. @Geodetic was right, the issue was with pandas and not pickle. – Ster