Hi, Looks like this is now being tracked on https://github.com/googleads/googleads-python-lib/issues/55. Could you subscribe to that thread? The library owner is already on that thread, and he will work with you to get the issue fixed.
Cheers, Anash On Wednesday, May 6, 2015 at 12:10:08 PM UTC-4, João Aparício wrote: > > That doesn't seem to work, unfortunately. > > Code: > > r = report_downloader.DownloadReportAsStringWithAwql(report_query, > 'GZIPPED_CSV') > > Error: > > Traceback (most recent call last): > File "get_keywords_ids.py", line 84, in <module> > get_kws_one_acc(acc_id) > File "get_keywords_ids.py", line 51, in get_kws_one_acc > r = > report_downloader.DownloadReportAsStringWithAwql(report_query, > 'GZIPPED_CSV') > 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 0x8b in position > 1: ordinal not in range(128) > > > > On Tuesday, April 28, 2015 at 7:34:13 PM UTC+1, Anash P. Oommen (AdWords > API Team) wrote: >> >> 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/8884d2fd-5ecf-4138-872a-88a7fff7978f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
