Hi,
I'm trying to get GEO_PERFORMANCE_REPORT from API. 
When I tried with the sample "CRITERIA_PERFORMANCE_REPORT", the call is 
successful, when I tried with GEO_PERFORMANCE_REPORT, I get below errors:

from googleads import adwords

def main(client):
  # Initialize appropriate service.
    report_downloader = client.GetReportDownloader(version='v201705')


  # Create report query.
    report_query = ('SELECT CampaignId FROM GEO_PERFORMANCE_REPORT '

                  )


    queried_string = report_downloader.DownloadReportAsStringWithAwql(
       report_query, 'CSV', skip_report_header=False, skip_column_header=
False,
       skip_report_summary=False, include_zero_impressions=True)
    return queried_string

adwords_client = adwords.AdWordsClient.LoadFromStorage()
query = main(adwords_client)

---------------------------------------------------------------------------AdWordsReportError
                        Traceback (most recent call 
last)<ipython-input-55-7f179bb5e4c1> in <module>()      1 adwords_client = 
adwords.AdWordsClient.LoadFromStorage('/home/zhge/purchase_journey/gg_api_call/googleads.yaml')---->
 2 query = main(adwords_client)
<ipython-input-54-6b10349e101a> in main(client)     24     queried_string = 
report_downloader.DownloadReportAsStringWithAwql(     25        report_query, 
'CSV', skip_report_header=False, skip_column_header=False,---> 26        
skip_report_summary=False, include_zero_impressions=True)     27     return 
queried_string     28 
/home/zhge/purchase_journey/peanutbutter_jelly/env/local/lib/python2.7/site-packages/googleads/common.pyc
 in Wrapper(*args, **kwargs)    527       with _UTILITY_LOCK:    528         
_utility_registry.Add(registry_name)--> 529       return utility_method(*args, 
**kwargs)    530     return Wrapper    531 
/home/zhge/purchase_journey/peanutbutter_jelly/env/local/lib/python2.7/site-packages/googleads/adwords.pyc
 in DownloadReportAsStringWithAwql(self, query, file_format, **kwargs)   1453   
  try:   1454       response = self._DownloadReportAsStream(-> 1455           
self._SerializeAwql(query, file_format), **kwargs)   1456       return 
response.read().decode('utf-8')   1457     finally:
/home/zhge/purchase_journey/peanutbutter_jelly/env/local/lib/python2.7/site-packages/googleads/adwords.pyc
 in _DownloadReportAsStream(self, post_body, **kwargs)   1616             
'Request Summary: %s', self._ExtractRequestSummaryFields(   1617                
 request, error=e))-> 1618       raise self._ExtractError(e)   1619    1620   
def _SanitizeRequestHeaders(self, headers):
AdWordsReportError: AdWords report download failed with HTTP status code: 400



I tried to get the fields for GEO_PERFORMANCE_REPORT, and I was able to do 
that.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c692d3ae-8d43-4de2-ab2a-ad51053fb273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to