Report download issues

39 views
Skip to first unread message

Praveen Jose

unread,
Mar 25, 2019, 6:57:09 AM3/25/19
to AdWords API and Google Ads API Forum
Hi Guys,

I have been trying to download a criteria performance report with the below report configuration 

report = {
      'reportName': 'Header - Last 7 days CRITERIA_PERFORMANCE_COST_REPORT for '+vAccName,
      'dateRangeType': 'LAST_7_DAYS',
      'reportType': 'CRITERIA_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['Date', 'AdGroupId', 'CampaignName', 'AdGroupName', 'Impressions', 'Clicks', 'Cost'],
          'predicates': [{'field': 'Cost','operator': 'GREATER_THAN_EQUALS','values': ['0']}]
      }
  }

I am using a file object to write the report data to a csv file . However i am getting the below error

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 16383: unexpected end of data


The above code sample works perfectly when the predicate is given as {'field': 'Cost','operator': 'NOT_IN','values': ['0']}


Can someone please provide guidance here?

Thanks in advance

googleadsapi...@google.com

unread,
Mar 25, 2019, 2:56:47 PM3/25/19
to AdWords API and Google Ads API Forum
Hello Praveen,

I have used the predicate GREATER_THAN_EQUALS in my report definition and was able to fetch the report successfully. You will only be able to use this predicate for the numeric fields like AdGroupId, Impressions, Clicks, or Cost fields. If you are still facing the issue, please share the query snippet and the error you are facing. You could use reply privately to the author option while sharing the information requested.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages