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

Adwords report downloader fails when downloading gzipped report in Python 3 #6

Closed
yeungsons opened this issue Apr 16, 2014 · 4 comments

Comments

@yeungsons
Copy link

When the report download format is set to 'GZIPPED_CSV' or 'GZIPPED_CSV', chunk.decode() will fail as the input stream contains binary bytes that cannot be decoded using UTF-8 in Python 3

@msaniscalchi
Copy link
Contributor

We'll look into this.

@yeungsons
Copy link
Author

20140423114841

@msaniscalchi
Copy link
Contributor

If the format is GZIPPED, you need to specify an output in binary mode. The default sys.stdout isn't in binary mode, which causes the problem. This would appear as gibberish in Python 2, and will raise an exception in Python 3 since it attempts to decode the compressed report.

In the next release, we will be more clear about the need for an output in binary mode for GZIPPED reports.

@msaniscalchi
Copy link
Contributor

We've fixed this in the 1.0.5 release.

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