python sdk中的bingads V13报告请求失败
我尝试使用PythonSDK下载bingads报告,但在提交报告请求后,我不断收到一个错误:“键入not found:‘Aggregation’”。我已经尝试了以下链接中提到的所有4个选项: 请求之前的身份验证过程工作正常 我执行以下命令:python sdk中的bingads V13报告请求失败,python,python-3.7,bing-ads-api,Python,Python 3.7,Bing Ads Api,我尝试使用PythonSDK下载bingads报告,但在提交报告请求后,我不断收到一个错误:“键入not found:‘Aggregation’”。我已经尝试了以下链接中提到的所有4个选项: 请求之前的身份验证过程工作正常 我执行以下命令: report_request = get_report_request(authorization_data.account_id) reporting_download_parameters = ReportingDownl
report_request = get_report_request(authorization_data.account_id)
reporting_download_parameters = ReportingDownloadParameters(
report_request=report_request,
result_file_directory=FILE_DIRECTORY,
result_file_name=RESULT_FILE_NAME,
overwrite_result_file=True, # Set this value true if you want to overwrite the same file.
timeout_in_milliseconds=TIMEOUT_IN_MILLISECONDS
)
output_status_message("-----\nAwaiting download_report...")
download_report(reporting_download_parameters)
经过仔细调试后,程序在尝试执行“reporting_service_manager.py”中的命令时似乎失败了。以下是工作流程:
download_report(self, download_parameters):
report_file_path = self.download_file(download_parameters)
然后:
然后:
SubmitGenerateReport启动一系列事件,最后调用“service_client.py”中的“\u SeviceCall.init”函数,返回异常“Type not found:'Aggregation'”
谁能给我点启示吗
谢谢请确保设置聚合,如图所示
aggregation='Daily'
如果报告类型不使用聚合,则可以将聚合设置为无
这有帮助吗?请确保设置聚合,如图所示
aggregation='Daily'
如果报告类型不使用聚合,则可以将聚合设置为无
这有帮助吗?这可能是事后两个月有点晚了,但这可能会帮助其他人。我也犯了同样的错误(尽管我想可能不是同一个问题)。看起来你确实做了我做的事情(我相信其他人也会这么做):复制粘贴Microsoft示例代码并尝试运行它,结果发现它不起作用 我花了相当长的时间试图调试这个问题,在我看来,XML没有被正确搜索。当时我在脚本中使用suds-py3,所以我尝试了一下,之后一切都正常了 我还重新阅读了《重新开始》的指南,发现他们推荐的是
长话短说:如果你想使用bingads API,不要使用suds-py3,可以使用suds社区(我可以确认它适用于我使用过的所有API)或suds jurko(微软推荐的)。这可能晚了两个月,但这可能会帮助其他人。我也犯了同样的错误(尽管我想可能不是同一个问题)。看起来你确实做了我做的事情(我相信其他人也会这么做):复制粘贴Microsoft示例代码并尝试运行它,结果发现它不起作用 我花了相当长的时间试图调试这个问题,在我看来,XML没有被正确搜索。当时我在脚本中使用suds-py3,所以我尝试了一下,之后一切都正常了 我还重新阅读了《重新开始》的指南,发现他们推荐的是
长话短说:如果您想使用bingads API,请不要使用suds-py3,使用suds社区(我可以确认它适用于我使用该API的所有内容)或suds jurko(这是Microsoft推荐的)。聚合参数设置正确。这就是为什么我没有得到这个错误…聚合参数设置正确。这就是为什么我没有得到这个错误。。。
download_file(self, download_parameters):
operation = self.submit_download(download_parameters.report_request)
submit_download(self, report_request):
self.normalize_request(report_request)
response = self.service_client.SubmitGenerateReport(report_request)
try:
response = self.service_client.soap_client.service.__getattr__(self.name)(*args, **kwargs)
return response
except Exception as ex:
if need_to_refresh_token is False \
and self.service_client.refresh_oauth_tokens_automatically \
and self.service_client._is_expired_token_exception(ex):
need_to_refresh_token = True
else:
raise ex