File "C:\Python27\lib\site-packages\suds\mx\core.py", line 72, in append
self.appender.append(parent, content)
File "C:\Python27\lib\site-packages\suds\mx\appender.py", line 88, in append
appender.append(parent, content)
File "C:\Python27\lib\site-packages\googleads\util.py", line 93, in PatchedAppend
suds.mx.appender.Appender.append(self, child, cont)
File "C:\Python27\lib\site-packages\suds\mx\appender.py", line 168, in append
self.marshaller.append(parent, content)
File "C:\Python27\lib\site-packages\suds\mx\core.py", line 71, in append
if self.start(content):
File "C:\Python27\lib\site-packages\suds\mx\literal.py", line 86, in start
raise TypeNotFound(content.tag)
suds.TypeNotFound: Type not found: 'dateRange'
def download_Performance_Criteria_Report(client):
rep_downloader = client.GetReportDownloader(version='v201710')
report = {
'reportName' : 'CAMPAIGN_PERFORMANCE_REPORT',
'dateRangeType' :'CUSTOM_DATE',
'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': ['CampaignId','CampaignName','ExternalCustomerId','Impressions','Clicks','Cost','Date']
},
'dateRange': { 'min' : '20180101',
'max' : '20180105'
}
}
rep_downloader.DownloadReport(report,sys.stdout,skip_report_header=False,skip_column_header=False,skip_report_summary=False)
report = {
'reportName': 'Last 7 days CRITERIA_PERFORMANCE_REPORT',
'dateRangeType': 'CUSTOM_DATE',
'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': ['CampaignId','CampaignName','ExternalCustomerId','Impressions','Clicks','Cost','Date'],
'dateRange': { 'min' : '20180101',
'max' : '20180105'
}
}
}