PandasIndexAdapter Error While Trying To Load A Pickle File

I have been trying to load a pickle file. I however get the same error on every platform I have python installed (even on a new computer with newly updated versions installed).


AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_6748/1536794851.py in
1 with open(“ToyData.pickle”, ‘rb’) as pickle_file:
----> 2 data=pickle.load(pickle_file)

AttributeError: Can’t get attribute ‘PandasIndexAdapter’ on <module ‘xarray.core.indexing’ from ‘C:\anaconda3\lib\site-packages\xarray\core\indexing.py’

An individual with the same error posted it on stackoverflow (python - I am getting error when trying to load pickle file - Stack Overflow).

Kindly assist in helping resolve the error in the index.py file.

I imported (pandas, numpy, pickle, xarray) while trying to load the pickle file.