Git Product home page Git Product logo

Comments (11)

qitia avatar qitia commented on July 29, 2024

I did not reproduce this issue. Could you please confirm there is nothing env change but just upgrade this SDK to 11.12.4? does it work with 11.12.3?

from bingads-python-sdk.

nmylarappa avatar nmylarappa commented on July 29, 2024

Hello,

I am seeing the below issue after pointing it to api version 12.

DEBUG:suds.client:sending to (https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V12/ReportingService.svc)
message:

<SOAP-ENV:Envelope xmlns:tns="https://bingads.microsoft.com/Reporting/v12" xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="https://bingads.microsoft.com/Reporting/v12" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
SOAP-ENV:Header
tns:DeveloperToken115I3QYKX8699642</tns:DeveloperToken>
</SOAP-ENV:Header>
ns1:Body
ns2:SubmitGenerateReportRequest
<ns2:ReportRequest xsi:type="ns2:KeywordPerformanceReportRequest">
ns2:FormatCsv</ns2:Format>
ns2:LanguageEnglish</ns2:Language>
ns2:ReturnOnlyCompleteDatafalse</ns2:ReturnOnlyCompleteData>
ns2:AggregationDaily</ns2:Aggregation>
ns2:Columns
ns2:KeywordPerformanceReportColumnAccountNumber</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAccountName</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAccountId</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnCurrencyCode</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnCampaignId</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnCampaignName</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnCampaignStatus</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnKeywordId</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnKeyword</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnKeywordStatus</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnTimePeriod</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnDeviceType</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnBidMatchType</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAveragePosition</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnSpend</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnClicks</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnConversions</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnImpressions</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAdGroupId</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAdGroupName</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAdGroupStatus</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnAdDistribution</ns2:KeywordPerformanceReportColumn>
ns2:KeywordPerformanceReportColumnNetwork</ns2:KeywordPerformanceReportColumn>
</ns2:Columns>
ns2:Scope
ns2:AccountIds
ns0:long47091023</ns0:long>
</ns2:AccountIds>
</ns2:Scope>
ns2:Time
ns2:CustomDateRangeEnd
ns2:Day11</ns2:Day>
ns2:Month09</ns2:Month>
ns2:Year2018</ns2:Year>
</ns2:CustomDateRangeEnd>
ns2:CustomDateRangeStart
ns2:Day06</ns2:Day>
ns2:Month09</ns2:Month>
ns2:Year2018</ns2:Year>
</ns2:CustomDateRangeStart>
ns2:ReportTimeZone/
</ns2:Time>
</ns2:ReportRequest>
</ns2:SubmitGenerateReportRequest>
</ns1:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:headers = {'SOAPAction': '"SubmitGenerateReport"', 'Content-Type': 'text/xml; charset=utf-8', 'User-Agent': 'BingAdsSDKPython 11.12.4 (2, 7, 6)'}
DEBUG:suds.client:HTTP failed - 500 - Internal Server Error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault>a:DeserializationFailedThe formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/Reporting/v12:ReportRequest. The InnerException message was 'Invalid enum value '' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.ReportTimeZone'. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.'. Please see InnerException for more details.</s:Fault></s:Body></s:Envelope>
ERROR:suds.client:<suds.sax.document.Document instance at 0x7fbaa0cf7e18>
Traceback (most recent call last):
File "/home/nmylarappa/dwh/Scripts/mktg_bing_keyword_perf_f/pythonscripts/bing_download.py", line 442, in
output_webfault_errors(ex)
File "/home/nmylarappa/dwh/Scripts/mktg_bing_keyword_perf_f/pythonscripts/bing_download.py", line 216, in output_webfault_errors
raise Exception('Unknown WebFault')
Exception: Unknown WebFault

from bingads-python-sdk.

qitia avatar qitia commented on July 29, 2024

Thanks @nmylarappa seems you are reporting two different issues? May I know if you still repro the 'TargetSetting' issue with V11?

For the second Download Reporting issue, though it is 'nillabe'(reference), missing of request.Time.ReportTimeZone will cause this issue, this should be a SUDS limitation. Currently you have two ways to work around this:

1, set a valid timezone for this parameter - FYI the valid timezone is listed here, for e.g.
submit_request.Time.ReportTimeZone = 'CentralAmerica'
more examples here. Or if you do not know which should be used

2, try add this line before submitting the request
submit_request = self.reporting_service.factory.create('KeywordPerformanceReportRequest')
delattr(submit_request.Time, "ReportTimeZone")
...

Let me know.

from bingads-python-sdk.

harry1180 avatar harry1180 commented on July 29, 2024

Thanks @qitia a lot this solved our issue. but we have this same issue for campaign performance end point too. we deleted ReportTimeZone attribute but it is not working. Do we have to delete any other attributes ?
are we missing something else ?

sample log :

=== Start downloading CampaignPerformanceReport_B017WYJL.csv ===
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
File "/home/hkoppuravuri/dwh/Scripts/mktg_bing_campaign_perf_f/pythonscripts/bing_download.py", line 440, in
output_webfault_errors(ex)
File "/home/hkoppuravuri/dwh/Scripts/mktg_bing_campaign_perf_f/pythonscripts/bing_download.py", line 217, in output_webfault_errors
raise Exception('Unknown WebFault')
Exception: Unknown WebFault

from bingads-python-sdk.

qitia avatar qitia commented on July 29, 2024

@harry1180 do you have the soap request and response?

from bingads-python-sdk.

harry1180 avatar harry1180 commented on July 29, 2024

Yes I have (I and @nmylarappa belong to same team btw)

from bingads-python-sdk.

harry1180 avatar harry1180 commented on July 29, 2024

I tried deleting all columns with None value. "delattr(report_request.Time, "ReportTimeZone")
delattr(report_request.Time, "PredefinedTime")
delattr(report_request.Filter, "AccountStatus")
delattr(report_request.Filter, "AdDistribution")
delattr(report_request.Filter, "DeviceOS")
delattr(report_request.Filter, "DeviceType")
delattr(report_request.Filter, "Status")
delattr(report_request.Scope, "AdGroups")
delattr(report_request.Scope, "Campaigns")
but still it did not work

from bingads-python-sdk.

harry1180 avatar harry1180 commented on July 29, 2024

may be this long can help u understand issue more in detail
=== Start downloading CampaignPerformanceReport_B017WYJL.csv ===
DEBUG:suds.client:sending to (https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V12/ReportingService.svc)
message:

<SOAP-ENV:Envelope xmlns:tns="https://bingads.microsoft.com/Reporting/v12" xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="https://bingads.microsoft.com/Reporting/v12" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
SOAP-ENV:Header
tns:AuthenticationTokenXXXXX</tns:AuthenticationToken>
tns:CustomerAccountIdXXXXXXXX</tns:CustomerAccountId>
tns:CustomerIdXXXXX</tns:CustomerId>
tns:DeveloperTokenXXXXX</tns:DeveloperToken>
</SOAP-ENV:Header>
ns1:Body
ns2:SubmitGenerateReportRequest
<ns2:ReportRequest xsi:type="ns2:CampaignPerformanceReportRequest">
ns2:FormatCsv</ns2:Format>
ns2:LanguageEnglish</ns2:Language>
ns2:ReturnOnlyCompleteDatafalse</ns2:ReturnOnlyCompleteData>
ns2:AggregationDaily</ns2:Aggregation>
ns2:Columns
ns2:CampaignPerformanceReportColumnAccountId</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAccountName</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAccountNumber</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCampaignId</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCampaignName</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnStatus</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnTimePeriod</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnDeviceType</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCurrencyCode</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnSpend</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnImpressions</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnClicks</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAverageCpc</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAverageCpp</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAveragePosition</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCtr</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnConversions</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnNetwork</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnAdDistribution</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnQualityScore</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnRevenue</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnRevenuePerAssist</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnReturnOnAdSpend</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnRevenuePerConversion</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCostPerAssist</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnCostPerConversion</ns2:CampaignPerformanceReportColumn>
ns2:CampaignPerformanceReportColumnConversionRate</ns2:CampaignPerformanceReportColumn>
</ns2:Columns>
ns2:Scope
ns2:AccountIds
ns0:longXXXXXXXX</ns0:long>
</ns2:AccountIds>
</ns2:Scope>
ns2:Time/
</ns2:ReportRequest>
</ns2:SubmitGenerateReportRequest>
</ns1:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:headers = {'SOAPAction': '"SubmitGenerateReport"', 'Content-Type': 'text/xml; charset=utf-8', 'User-Agent': 'BingAdsSDKPython 11.12.4 (2, 7, 6)'}
DEBUG:suds.client:HTTP failed - 500 - Internal Server Error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault>a:DeserializationFailedThe formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/Reporting/v12:ReportRequest. The InnerException message was 'Invalid enum value 'Status' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.CampaignPerformanceReportColumn'. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.'. Please see InnerException for more details.</s:Fault></s:Body></s:Envelope>
ERROR:suds.client:<suds.sax.document.Document instance at 0x7f5a9868d5f0>
Traceback (most recent call last):
File "/home/hkoppuravuri/dwh/Scripts/mktg_bing_campaign_perf_f/pythonscripts/bing_download.py", line 448, in
output_webfault_errors(ex)
File "/home/hkoppuravuri/dwh/Scripts/mktg_bing_campaign_perf_f/pythonscripts/bing_download.py", line 216, in output_webfault_errors
raise Exception('Unknown WebFault')
Exception: Unknown WebFault

from bingads-python-sdk.

qitia avatar qitia commented on July 29, 2024

@nmylarappa @harry1180 Are you switching from V11 to V12? Please notice that there are some breaking changes when we upgrade to v12. For example the column names for CampaignPerformanceReport are not exactly same. Please see v11 and v12 for reference. I think for v12, it should be CampaignStatus what you want.

from bingads-python-sdk.

qitia avatar qitia commented on July 29, 2024

@nmylarappa @harry1180 I suppose your issue has been resolved. I close this issue and you can re-open it in case more concern.

from bingads-python-sdk.

harry1180 avatar harry1180 commented on July 29, 2024

Hi @qitia ,

Thanks for helping us in our earlier issue. We are in need of some info so thought of posting it in here.

we are facing an issue with the reporting data related to four campaigns in particular for our camapign section end point.
There is this column called Addistribution which should have 'Search' or 'Content' or 'Native' but we are getting a new value named 'Audience'. This cannot be an appropriate value for ad distribution as far as we understand.
We have this value only for the recent records and that too after version upgrade.
Can you confirm on this once pls?

we are noticing this value for four of our campaigns. Happy to have a session to discuss on this.
If it is a valid value we need to change our ETL logic to facilitate the same. Kindly confirm on the same.

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.