I updated mne python to version 3.10.9. When I now try to simply print a previously saved AverageTFR object (named “power”) or try to modify it in either the time or frequency domain with e.g power.crop(fmin = 5, max = 12) I receive the following error:
‘AverageTFR’ object has no attribute ‘_times_readonly’
Before updating mne python I had no problem with this command. I am happy for any help or solution. Thanks in advance
It appears I’ll need more version information in order to properly diagnose what’s going on (i.e. which version were they made with and I assume 1.3.1 is what they were read in with).
EDIT: I also tried with 1.2.0 and dev and it also worked
EDIT2: 0.24 and 1.3.1 also worked
Hi, sorry for the late reply and thanks for your effort already.
I created it in mne version 0.24 (python 3.8.0) and then I try to read it with mne version 1.3.1(python 3.10.1) . When I rerun my script in mne version 1.3.1 and save it it works. I also did not save the AverageTFR object directly but appended it to a list and saved it with pickle, previously it worked like this. I can share a snipped of my code later today.
You should read back the pickle with the version of MNE that was used to create it; and then use our .save() methods to write the data to disk, like @agramfort suggested.