Skip to content

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

Closed
@shashank88

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?

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