Hi Team, Could someone help me in below code as i am not able find exact refrence eventhough i tried using different highlighted error syntax
#from googleads import adwords from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException from datetime import date, timedelta, datetime import math import pandas import argparse import os import locale import sys import _locale _locale._getdefaultlocale = (lambda *args: ['en_US', 'UTF-8']) def main(client): # Initialize appropriate service. #report_downloader = client.GetReportDownloader(version='v201809') ga_service = client.get_service("GoogleAdsService") # Define date ranges. end_date = datetime.today().strftime('%Y%m%d') start_date = (datetime.today() - timedelta(180)).strftime('%Y%m%d') # Create report query. report_query = ( """ SELECT segments.date, campaign.name, campaign.id, campaign.status, campaign.campaign_budget, campaign_budget.amount_micros, metrics.conversions, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.ctr FROM campaign WHERE campaign.status IN ("ENABLED","PAUSED") DURING {start_date}, {end_date} """ ) include_zero_impression_flag = True file_path = 'C:/New folder/Output Files/Adwords report pull/' file_name = 'MarketPlace_daily_campaign_performance_report.csv' f = open(os.path.join(file_path, file_name), 'wb') # including the SKUs with zero_impressions * ga_service. (report_query.format(**{'start_date': start_date, 'end_date': end_date}), 'CSV', f, skip_report_header=True, skip_column_header=False, skip_report_summary=True, include_zero_impressions=include_zero_impression_flag) print("Downloading to {0}......".format(os.path.join(file_path, file_name)))* if __name__ == '__main__': # Initialize client object. #adwords_client = adwords.AdWordsClient.LoadFromStorage('D:\MBB\yaml\MarketPlace_daily_access.yaml') googleads_client = GoogleAdsClient.load_from_storage('D:\MBB\yaml\MarketPlace_daily_access.yaml') main(googleads_client) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads 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 "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/102c65bb-6b42-4a4f-85bd-329f09cb402dn%40googlegroups.com.