Git Product home page Git Product logo

Comments (12)

sflynn-mf avatar sflynn-mf commented on July 29, 2024

I am having the exact same issue I would love to see this resolved!

from bingads-python-sdk.

qingjuntian avatar qingjuntian commented on July 29, 2024

Could you please provide more detail info? Do you have trackingID or requestID? Or account info?

from bingads-python-sdk.

eric-urban avatar eric-urban commented on July 29, 2024

@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.

from bingads-python-sdk.

sflynn-mf avatar sflynn-mf commented on July 29, 2024

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.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">1c67ca0e-8846-4071-afb0-06e1e9f441a3</h:TrackingId>
</s:Header>
<s:Body>

30000001087803661

</s:Body>
</s:Envelope>

Here is the response.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">1be17748-56c6-46f9-a2df-676d93d91df9</h:TrackingId>
</s:Header>
<s:Body>



Success


</s:Body>
</s:Envelope>

What’s strange to me is that the status of THIS response is Success (the last two or three PollGenerateReportResponse's came back as pending) so that must mean the report has finished downloading, but the ReportDownloadUrl is always None when I check it in my program, and no files are ever downloaded to my machine.

I just downloaded the SDK yesterday so my apologies if I'm missing something obvious!

from bingads-python-sdk.

sflynn-mf avatar sflynn-mf commented on July 29, 2024

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.

from bingads-python-sdk.

CurtisGreenland avatar CurtisGreenland commented on July 29, 2024

@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'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/Reporting/v11" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays">SOAP-ENV:Headertns:AuthenticationToken***</tns:AuthenticationToken>tns:CustomerAccountIdXXXXXXX</tns:CustomerAccountId>tns:CustomerIdXXXXX</tns:CustomerId>tns:DeveloperTokenXXXXXXXXXX</tns:DeveloperToken></SOAP-ENV:Header>ns0:Bodyns1:SubmitGenerateReportRequest<ns1:ReportRequest xsi:type="ns1:KeywordPerformanceReportRequest">ns1:FormatCsv</ns1:Format>ns1:LanguageEnglish</ns1:Language>ns1:ReportNameMy Keyword Performance Report</ns1:ReportName>ns1:ReturnOnlyCompleteDatafalse</ns1:ReturnOnlyCompleteData>ns1:AggregationDaily</ns1:Aggregation>ns1:Columnsns1:KeywordPerformanceReportColumnTimePeriod</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnAccountId</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnCampaignId</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnKeyword</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnKeywordId</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnDeviceType</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnBidMatchType</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnClicks</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnImpressions</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnCtr</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnAverageCpc</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnSpend</ns1:KeywordPerformanceReportColumn>ns1:KeywordPerformanceReportColumnQualityScore</ns1:KeywordPerformanceReportColumn></ns1:Columns>ns1:MaxRows10</ns1:MaxRows>ns1:Scopens1:AccountIdsns2:longXXXXXXXX</ns2:long></ns1:AccountIds></ns1:Scope>ns1:Sortns1:KeywordPerformanceReportSortns1:SortColumnClicks</ns1:SortColumn>ns1:SortOrderAscending</ns1:SortOrder></ns1:KeywordPerformanceReportSort></ns1:Sort>ns1:Timens1:PredefinedTimeYesterday</ns1:PredefinedTime></ns1:Time></ns1:ReportRequest></ns1:SubmitGenerateReportRequest></ns0:Body></SOAP-ENV:Envelope>'
DEBUG:suds.transport.http:received:
CODE: HTTPStatus.OK
HEADERS: Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Tue, 16 Jan 2018 17:05:51 GMT
Connection: close
Content-Length: 399

MESSAGE:
b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">410bb168-7008-447e-8fe7-972fb457b833</h:TrackingId></s:Header><s:Body>30000001231499722</s:Body></s:Envelope>'
DEBUG:suds.client:HTTP succeeded:
b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">410bb168-7008-447e-8fe7-972fb457b833</h:TrackingId></s:Header><s:Body>30000001231499722</s:Body></s:Envelope>'
Awaiting Download Results . . .
DEBUG:suds.client:sending to (https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc)
message:
<suds.sax.document.Document object at 0x000000000EC0DC18>
DEBUG:suds.client:headers = {'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': b'"PollGenerateReport"', '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'"PollGenerateReport"', 'User-Agent': 'BingAdsSDKPython 11.5.7 (3, 6, 3)', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': b'"PollGenerateReport"', 'User-agent': 'BingAdsSDKPython 11.5.7 (3, 6, 3)'}
MESSAGE:
b'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/Reporting/v11">SOAP-ENV:Headertns:AuthenticationToken***</tns:AuthenticationToken>tns:CustomerAccountIdXXXXXXX</tns:CustomerAccountId>tns:CustomerIdXXXXXXXX</tns:CustomerId>tns:DeveloperTokenXXXXXXXXXXXXX</tns:DeveloperToken></SOAP-ENV:Header>ns0:Bodyns1:PollGenerateReportRequestns1:ReportRequestId30000001231499722</ns1:ReportRequestId></ns1:PollGenerateReportRequest></ns0:Body></SOAP-ENV:Envelope>'
DEBUG:suds.transport.http:received:
CODE: HTTPStatus.OK
HEADERS: Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Tue, 16 Jan 2018 17:05:53 GMT
Connection: close
Content-Length: 495

MESSAGE:
b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">8710a3bd-71cf-437a-b198-ca14846431d5</h:TrackingId></s:Header><s:Body>Success</s:Body></s:Envelope>'
DEBUG:suds.client:HTTP succeeded:
b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId xmlns:h="https://bingads.microsoft.com/Reporting/v11">8710a3bd-71cf-437a-b198-ca14846431d5</h:TrackingId></s:Header><s:Body>Success</s:Body></s:Envelope>'
Download result file: None
Status: Success

Program execution completed`

from bingads-python-sdk.

eric-urban avatar eric-urban commented on July 29, 2024

@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.

from bingads-python-sdk.

CurtisGreenland avatar CurtisGreenland commented on July 29, 2024

@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.

from bingads-python-sdk.

gregroberts avatar gregroberts commented on July 29, 2024

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.

from bingads-python-sdk.

eric-urban avatar eric-urban commented on July 29, 2024

@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.

from bingads-python-sdk.

amitlimbaskar avatar amitlimbaskar commented on July 29, 2024

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 ?

from bingads-python-sdk.

Shellbye avatar Shellbye commented on July 29, 2024

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.

from bingads-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.