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

Python 3 error loading pickle #18

Open
cescgina opened this issue Oct 1, 2021 · 0 comments
Open

Python 3 error loading pickle #18

cescgina opened this issue Oct 1, 2021 · 0 comments

Comments

@cescgina
Copy link

cescgina commented Oct 1, 2021

When using pmx from the develop branch with python3 I get the following error:

TypeError: a bytes-like object is required, not 'str'
The error occurs in the following line:

return pickle.load(open(data_file))

The fix seems quite easy, just open the file with mode "rb" and pass bytes to pickle.load, and that seems to work both in python2 and 3. I can open a PR for you to review if you want.

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

No branches or pull requests

1 participant