Hi Joao,
Could you please fine a bug with the Python client library at
https://github.com/googleads/googleads-python-lib/issues? The report is
encoded in UTF-8, so I suspect that the library is picking an incorrect
encoder.
A temporary workaround would be to download the report as GZIPPED_CSV
instead of CSV, and then unzip it in memory.
Cheers,
Anash P. Oommen,
AdWords Scripts Team.
On Tuesday, April 28, 2015 at 5:49:59 AM UTC-4, João Aparício wrote:
>
> Not much more to say apart from the title.
>
> I have the code:
>
> report_downloader = client.GetReportDownloader(version='v201409')
> report_query = ('SELECT Impressions,QualityScore,KeywordText ' +
> 'FROM KEYWORDS_PERFORMANCE_REPORT ' +
> 'WHERE Impressions > 0 ' +
> 'DURING YESTERDAY ')
> r = report_downloader.DownloadReportAsStringWithAwql(report_query,
> 'CSV').splitlines()
>
> And I get the exception:
>
> Traceback (most recent call last):
> File "qs_tracking.py", line 100, in <module>
> qs_report(list_of_customer_ids, tracking_config)
> File "qs_tracking.py", line 68, in qs_report
> r = qs_report_one_acc(client)
> File "qs_tracking.py", line 34, in qs_report_one_acc
> r =
> report_downloader.DownloadReportAsStringWithAwql(report_query,
> 'CSV').splitlines()
> File "/usr/local/lib/python2.7/dist-packages/googleads/adwords.py",
> line 635, in DownloadReportAsStringWithAwql
> return response.read().decode()
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 55408: ordinal not in range(128)
>
> This only happens in one of my accounts. In the others this code runs fine.
>
>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/53ff3d24-961a-4e76-851e-46bea8e26d67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.