AttributeError: Can't Get Attribute '_unpickle_block'

On linux machine you can get AttributeError: Can't Get Attribute '_unpickle_block' error because of different version of pickle.

If Your file is created with older version of Pandas. And now if you use newer version of pickel, It can not handle "deserialize" of the object because as there may be new fields added. this is mostly because of API changes.

Exampe code:

raw_data = pickle.load(pfile)  

Error code:

AttributeError: Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' from '/opt/conda/lib/python3.8/site-packages/pandas/_libs/'>

Just make sure you are using same version of pickle to create and load .pickle file.

Related Articles

js interview questions