Skip to content

Python 3 pickle error #11

Description

@dmdm

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions