Comments (6)
Hi, are you using the 'production' env?
I tried to reproduce locally, but haven't see the same error.
do you have any problems when using other bingads services?
For the exceptions: could you please add a try block to catch the exceptions? below is an example:
try:
campaign_service = ServiceClient(
'CampaignManagementService',
authorization_data=authorization_data,
environment=BING_ENVIRONMENT
)
print(campaign_service.service_url)
except suds.WebFault as ex:
# please add a break point or print the ex to check the exception details.
...
Thanks.
from bingads-python-sdk.
Regarding No handlers could be found for logger "suds.client", you can import logging as shown in this example:
https://github.com/bing-ads-sdk/BingAds-Python-SDK/blob/master/examples/BingAdsPythonExamplesConsole/BingAdsPythonExamplesConsole/SearchUserAccounts.py#L9
9 #import logging
10 #logging.basicConfig(level=logging.INFO)
11 #logging.getLogger('suds.client').setLevel(logging.DEBUG)
I hope this helps!
from bingads-python-sdk.
Hi gents
Yes, I am using the 'production' environment
I am away from a computer now, but will try the suggestions and come back with more info.
from bingads-python-sdk.
Hi
I tried again today on my workstation, it works well on my side, for your function definition:
def _build_campaign_service(self, account_id, customer_id)
it will return a campaign_service instance without error. And I added more test to check if the methods of campaign service can work.
Not sure what authentication method you are using, here I use PasswordAuthentication. below is my code:
def _build_campaign_service(account_id, customer_id):
authorization_data = AuthorizationData(
account_id=ACCOUNT_ID,
customer_id=CUSTOMER_ID,
developer_token=DEVELOPER_TOKEN,
authentication=PasswordAuthentication(user_name=USER_NAME, password=PASSWORD)
)
campaign_service = ServiceClient(
'CampaignManagementService',
authorization_data=authorization_data,
environment='production'
)
return campaign_service
test_campaign = _build_campaign_service(ACCOUNT_ID, CUSTOMER_ID)
test_get_campaigns = test_campaign.GetCampaignsByAccountId(ACCOUNT_ID)
I checked test_get_campaigns, it returned all the campaigns under the account id.
Thanks.
from bingads-python-sdk.
Hi, this is quite weird:
ipdb> campaign_service
*** MethodNotFound: Method not found: 'CampaignManagementService.BasicHttpBinding_ICampaignManagementService.__repr__'
ipdb> campaign_service.service_url
'https://api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?singleWsdl'
It seems that it actually works - the reason I thought it was hanging was that, using this code to pull all the campaigns, it took a very long time to return all of them (10+ minutes), even though they are less than ten campaigns, all in the last 6 months.
I can't explain the error above - I am using the Oauth method and am getting the same issue both on my local development box and on our server (both are Ubuntu 12.x machines)
I am using the following package versions.
bingads==9.3.4
suds-jurko==0.6
Oh well, as long as it works...
I don't know if it's worth investigating this issue any further since I can get the results, I think it can be closed.
However, if I could be of any use to help debugging it, I'd love to help.
Thanks for the suggestions!
from bingads-python-sdk.
Thanks. If you have further problems please feel free to let us know.
from bingads-python-sdk.
Related Issues (20)
- webfault: The InnerException message was 'Invalid enum value 'BudgetStatus' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.ProductPartitionPerformanceReportColumn' HOT 1
- Help with error code
- campaign_service.factory.create('ns3:ArrayOfstring') Error HOT 2
- Issue with making a Keyword Insight request? HOT 1
- Invalid client data. Check the SOAP fault details for more information. TrackingId: 905027f5-fc4e-44ab-9af4-58af8ced8dae. HOT 1
- The image ad extension's DisplayText is too long. HOT 1
- Cannot fetch details for Audience campaign HOT 3
- Tennant issue. Cannot find ads API in permissions. HOT 1
- TargetImpressionShare is not defined HOT 1
- Invalid client data. Check the SOAP fault details for more information. HOT 1
- Trying to use the examples with no success
- TypeError HOT 2
- adinsight_service.GetRecommendations returns nothing HOT 3
- upload_entities for BulkServiceManager no response or update in ad manager HOT 2
- The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/Reporting/v13:ReportRequest. The InnerException message was 'Invalid enum value '' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.ReportTimePeriod'. 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.' HOT 1
- Web service reported a SOAP processing fault using an unexpected HTTP status code 200. Reporting as an internal server error. HOT 3
- last_completed_available_date gives ValueError: unconverted data remains: AM HOT 5
- Issue with SOAP Processing Fault and Unexpected HTTP Status Code 200 in CampaignManagementService HOT 2
- AttributeError: 'Text' object has no attribute 'Campaign'
- End element 'AccountIds' from namespace ' https://bingads.microsoft.com/Billing/v13' expected. Found element 'ns1:AccountIds' from namespace ' https://bingads.microsoft.com/Billing/v13'. Line 1, position 2519.' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bingads-python-sdk.