Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Pickle. AttributeError: 'module' object has no attribute '_new_Index' #70048

Closed
GeoffreyMgardon mannequin opened this issue Dec 14, 2015 · 2 comments
Closed
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@GeoffreyMgardon
Copy link
Mannequin

GeoffreyMgardon mannequin commented Dec 14, 2015

BPO 25861
Nosy @pitrou, @avassalotti, @serhiy-storchaka
Files
  • FigureTrajAndDeviation.py: Plot Eye movement trajectories, you need the data file to actually run it.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-12-14.15:25:47.437>
    created_at = <Date 2015-12-14.14:35:30.474>
    labels = ['type-bug', 'library']
    title = "Can't use Pickle. AttributeError: 'module' object has no attribute '_new_Index'"
    updated_at = <Date 2015-12-14.16:27:44.729>
    user = 'https://bugs.python.org/GeoffreyMgardon'

    bugs.python.org fields:

    activity = <Date 2015-12-14.16:27:44.729>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-12-14.15:25:47.437>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2015-12-14.14:35:30.474>
    creator = 'Geoffrey M\xc3\xa9gardon'
    dependencies = []
    files = ['41305']
    hgrepos = []
    issue_num = 25861
    keywords = []
    message_count = 2.0
    messages = ['256379', '256380']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'alexandre.vassalotti', 'serhiy.storchaka', 'Geoffrey M\xc3\xa9gardon']
    pr_nums = []
    priority = 'normal'
    resolution = 'third party'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25861'
    versions = ['Python 2.7']

    @GeoffreyMgardon
    Copy link
    Mannequin Author

    GeoffreyMgardon mannequin commented Dec 14, 2015

    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.

    @GeoffreyMgardon GeoffreyMgardon mannequin added type-crash A hard crash of the interpreter, possibly with a core dump stdlib Python modules in the Lib dir labels Dec 14, 2015
    @SilentGhost SilentGhost mannequin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Dec 14, 2015
    @serhiy-storchaka
    Copy link
    Member

    _new_Index is a function used in pandas to unpickle its Index objects. Added 29 Jul 2014 (pandas-dev/pandas@8d3cb3f). May be your current pandas is older than that used for pickling.

    In any case this is not a Python bug.

    @bitdancer bitdancer removed the invalid label Dec 14, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants