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

builtin.open error with Python 3.3 #4

Closed
provegard opened this issue Nov 19, 2013 · 1 comment
Closed

builtin.open error with Python 3.3 #4

provegard opened this issue Nov 19, 2013 · 1 comment

Comments

@provegard
Copy link

The following code gives an error with Python 3.3:

def set_cache(base, gist_id, body, filename=None):
    with open(cache_filename(base, gist_id, filename), 'w') as f:
        f.write(body)

Error: "TypeError: must be str, not bytes"

The call to open needs to specify 'wb'.

@streeter
Copy link
Owner

Cool, I should have fixed this with the just released version 0.3.0. Let me know if you see that it doesn't work for you.

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