Search code examples
pythonspyder

Unable to open .spydata in spyder: "Can't get attribute '_unpickle_block' on"


I am starting to use spyder, and I am having an issue in importing the data. Yesterday, I saved all variables using 'save data' in variable explorer, generating a file called data.spydata. I opened a new project just to test if it was OK, and I was able to open it. Today, I am attempting to importing all data from that data.spydata. Initially it complained about no pandas, and I have installed it using pip install pandas, and stopped complaining about. Now, the message is

Unable to load '//data.spydata' The error message was: Can't get attribute '_unpickle_block' on

The sentence appears to end without a complement, and I have no idea what it means... the variables were diverse, but mainly panda's data frame, lists and dictionaries... a request response, and json from this response...

The spyder is running in a conda environment. After the first message, I verified all packages used in the original code (pandas, request) are installed in that environment...

I appreciate any help.


Solution

  • I recently encountered the same problem! Then I realized that the pandas that I generated the pkl has version 1.4.0; while the pandas that I used to extract pkl has version 1.3.0.

    So what I do is to downgrade/upgrade pandas. This is a similar problem