yolk icon indicating copy to clipboard operation
yolk copied to clipboard

Python 3 pickle error

Open dmdm opened this issue 13 years ago • 1 comments

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".

dmdm avatar Aug 16 '12 09:08 dmdm

This is fixed in issue #13.

myint avatar Nov 11 '12 17:11 myint