This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Can't use Pickle. AttributeError: 'module' object has no attribute '_new_Index'
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Geoffrey Mégardon, alexandre.vassalotti, pitrou, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-12-14 14:35 by Geoffrey Mégardon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
FigureTrajAndDeviation.py Geoffrey Mégardon, 2015-12-14 14:35 Plot Eye movement trajectories, you need the data file to actually run it.
Messages (2)
msg256379 - (view) Author: Geoffrey Mégardon (Geoffrey Mégardon) Date: 2015-12-14 14:35
Hello,

I am trying to run a piece of code that I programmed some time ago.
Back then, it was working fine and it was plotting some data.
But today, while I am trying to improve the plots, I ran the code and did not work!

Here the message:

D:\Users\Geoffrey\Anaconda\python.exe "D:/Google Drive/Work/Experiences/experiment-deviation-initial/analysis/FigureTrajAndDeviation.py"
Traceback (most recent call last):
  File "D:/Google Drive/Work/Experiences/experiment-deviation-initial/analysis/FigureTrajAndDeviation.py", line 36, in <module>
    m = pickle.load( open(output_path+"/traj_and_RT_second_only.p", "rb" ) )
  File "D:\Users\Geoffrey\Anaconda\lib\pickle.py", line 1378, in load
    return Unpickler(file).load()
  File "D:\Users\Geoffrey\Anaconda\lib\pickle.py", line 858, in load
    dispatch[key](self)
  File "D:\Users\Geoffrey\Anaconda\lib\pickle.py", line 1090, in load_global
    klass = self.find_class(module, name)
  File "D:\Users\Geoffrey\Anaconda\lib\pickle.py", line 1126, in find_class
    klass = getattr(mod, name)
AttributeError: 'module' object has no attribute '_new_Index'

Process finished with exit code 1

I hope that you may now what it is about!!
I attached the code file.
msg256380 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-12-14 15:25
_new_Index is a function used in pandas to unpickle its Index objects. Added 29 Jul 2014 (https://github.com/pydata/pandas/commit/8d3cb3f36e2f7b415531e3b910f490c01657ecca). May be your current pandas is older than that used for pickling.

In any case this is not a Python bug.
History
Date User Action Args
2022-04-11 14:58:24adminsetgithub: 70048
2015-12-14 16:27:44r.david.murraysetresolution: not a bug -> third party
2015-12-14 15:25:47serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg256380

resolution: not a bug
stage: resolved
2015-12-14 15:04:02SilentGhostsetnosy: + pitrou, alexandre.vassalotti
type: crash -> behavior
2015-12-14 14:35:30Geoffrey Mégardoncreate