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

file needs explicit binary mode if on Windows #4

Open
Yakumounr opened this issue Jun 8, 2013 · 0 comments
Open

file needs explicit binary mode if on Windows #4

Yakumounr opened this issue Jun 8, 2013 · 0 comments

Comments

@Yakumounr
Copy link

line 139 of images.py

                with open( self.imagepath(result['name']), 'w') as f:

needs to be

                with open( self.imagepath(result['name']), 'wb') as f:

on windows, or the files written will be corrupt.

same for line 172

            self.request.response.body_file = open( self.imagepath(page), 'r', 10000)

should be

            self.request.response.body_file = open( self.imagepath(page), 'rb', 10000)
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