Closed CurtisGreenland closed 6 years ago
I am having the exact same issue I would love to see this resolved!
Could you please provide more detail info? Do you have trackingID or requestID? Or account info?
@CurtisGreenland and @sflynn-mf are you running this in sandbox or production? If there is no data for the time period specified in the request, then by design the service return success without any download URL.
It would help to understand what report type, date range, report columns, etc you are requesting. You can turn on logging to capture the SOAP request and response. The trace will include TrackingId as @qingjuntian requested. Please don't share credentials or account IDs here in public view. If we need such details to continue the investigation then we will suggest that you contact support.
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport.http').setLevel(logging.DEBUG)
BTW if you are indeed running the sample daily in production please note that only one of the "options" is needed. You can save time and resources commenting out or removing the other options e.g., just use Option A and remove B and C.
I am running in production as I am using OAuth to authenticate and I think I remember seeing somewhere sandbox mode wouldn't play nice with OAuth. You may be on to something with the date however give me a moment to check that out.
I did not change anything inside the file as far as date range, report columns, sort etc... The report type is set to what's returned by get_keyword_performance_report().
SOAP Messages:
Here is the request with time stamp 2018-01-15 16:24:44.351673.
<?xml version="1.0" encoding="UTF-8"?>
Thank you so much @eric-urban. I changed the date range and it started working instantly.
Thank you so much for your time! I will consult occam's razor next time.
@eric-urban I am in production. And there should be data for yesterday. If I run a keyword performance report in the Bing Ads UI, results come back.
Here is the output of the logging (I have X'd over all account ID's and developer token):
`<suds.sax.document.Document object at 0x000000000F62FA90>
DEBUG:suds.client:headers = {'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': b'"SubmitGenerateReport"', 'User-Agent': 'BingAdsSDKPython 11.5.7 (3, 6, 3)'}
DEBUG:suds.transport.http:sending:
URL: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': b'"SubmitGenerateReport"', 'User-Agent': 'BingAdsSDKPython 11.5.7 (3, 6, 3)', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': b'"SubmitGenerateReport"', 'User-agent': 'BingAdsSDKPython 11.5.7 (3, 6, 3)'}
MESSAGE:
b'<?xml version="1.0" encoding="UTF-8"?>
MESSAGE:
b'
MESSAGE:
b'
Program execution completed`
@CurtisGreenland we tracked down your request and found that one account has data for the date requested, whereas the other account does not. (Don't worry I will not share the account details in this public forum.) Keep in mind the sample is just a sample and picks one account to run against. Please double check that you are using the ID for the active account and you should get data returned.
@eric-urban Thank you. With a little extra work, I have re-coded so that I can pull all accounts at the same time. And, indeed I have resolved. I appreciate your help.
I know this has been closed, but I'd just like to say how weird this behaviour is.
I just spent 25 minutes trying to debug why a ReportingDownloadOperation was saying it was ' successful, then the download not actually producing anything.
Looks like the only way to actually determine this has happened at run time is that download_result_file
returns None.
@gregroberts thanks for the feedback! To help explain the reason for this change, previously clients had to download and parse the file only to discover in some cases there wasn't any data for the requested time period, scope, etc. Now the service returns nil ReportDownloadUrl to avoid the unnecessary download/parse steps.
I have the same issue. When I hard code the account ID s for authorization_data.account _id field and comment following code : user=get_user_response=customer_service.GetUser( UserId=None ).User accounts=search_accounts_by_user_id(customer_service, user.Id)
then I get the result when I use first account account from sample code I get result as none. How to get auth_helper to identify all the active accounts and run the report for all of them ?
If there is no data for the time period specified in the request, then by design the service return success without any download URL
This is really not a good design.
I successfully started using the python SDK, using it to pull performance reports using the example code provided here on GitHub. I am using the report_request.py example. I had been using it daily since the beginning of December with no issues. However, on January 1, everything stopped working with no changes to the code, and I have not been successful since then.
It appears to get through the creation of the report request, but seems to fail on the submit and download,
The output from running the report_requests.py: runfile('Y:/report_requests.py', wdir='Y:/') Python loads the web service proxies at runtime, so you will observe a performance delay between program launch and main execution...
Awaiting Background Completion . . . Download result file: None
Awaiting Submit and Download . . . Download result file: None
Awaiting Download Results . . . Download result file: None Status: Success
Program execution completed