I am having an issue when trying to import a .spydata
file in Spyder. I created a .spydata
file in a console using Spyder, then I opened a new console (same environment and everything) and tried to import the file.
Then Spyder throws an error:
'Unable to load .../.spydata'
The error message was:
'Object arrays cannot be loaded when allow_pickle=False'
The .spydata
file contains these object types: List, Set, Array, Dictionary, int, tuple, DataFrame, timedelta, timestamp.
I was able to succesfully save and import a .spydata
file with less objects (only two cells from the original script run).
I tried opening the file in a new environment with Numpy==1.16.1
(and pandas==1.1
for compatibility issues) as suggested in this question. But then I got this error message:
'Unable to load .../.spydata'
The error message was:
"Can't get attribute '_unpickle_block' on"
In this question the solution to that last error given by @CarlosCordoba is:
(Spyder maintainer here) This probably happened because you used two different versions of Pandas to save/load your data.
Yes, that was the problem. I had to downgrade pandas
to version 1.1
. And users seem to be able to fix the problem saving and loading the data with the same pandas version. Not me, I get the first error message.
Environment package versions:
Python 3.10.6
Anaconda 2.3.1
Spyder 5.3.2
Ipython 7.33.0
Numpy 1.23.3
Pandas 1.5.0