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 pickle error #11

Open
dmdm opened this issue Aug 16, 2012 · 1 comment
Open

Python 3 pickle error #11

dmdm opened this issue Aug 16, 2012 · 1 comment

Comments

@dmdm
Copy link

dmdm commented Aug 16, 2012

I had installed yolk in a Python 3.2 virtualenv. Querying cheeseshop for a name, e.g.
yolk -S name=couch
results in this error:
File "/home/dm/myprojects/python3-env/lib/python3.2/site-packages/yolk/pypi.py", line 179, in query_cached_package_list
return pickle.load(open(self.pkg_cache_file, "r"))
TypeError: 'str' does not support the buffer interface

Solution:
Docs for pickle.load() state, file must return bytes. Saying "rb" instead of "r" for open() seems to do the trick, Similarly, in line 185 say "wb" instead of "w".

@myint
Copy link

myint commented Nov 11, 2012

This is fixed in issue #13.

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

2 participants