Skip to content

Cannot Unpickle Python2 dict with future.str in key as it's unhashable in python3 #454

Description

@shashank88

If I have a dictionary which has a key of type: future.types.newstr.newstr (basically the str from builtins), and I try to pickle it and unpickle it back in python3 it doesn't work:

Traceback (most recent call last):
  File "/.PyCharm2018.3/config/scratches/scratch_6.py", line 16, in <module>
    main()
  File "/.PyCharm2018.3/config/scratches/scratch_6.py", line 11, in main
    trialsArr = pickle.load(fp)
TypeError: unhashable type: 'newstr'

Is there a way to work-around for this?

Activity

  1. added a commit that references this issue on May 6, 2019
    671a63e
  2. added a commit that references this issue on May 6, 2019
    5c7cdfb
  3. shashank88 commented on May 7, 2019

    @shashank88
    Author

    Thanks for fixing this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions