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

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

Closed
shashank88 opened this issue May 2, 2019 · 1 comment

Comments

@shashank88
Copy link

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?

@jmadler jmadler closed this as completed in 671a63e May 6, 2019
jmadler added a commit that referenced this issue May 6, 2019
Bug fix #454: Implement __hash__() in newstr
@shashank88
Copy link
Author

Thanks for fixing this! 👍

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

No branches or pull requests

2 participants