Git Product home page Git Product logo

Comments (6)

imagineful avatar imagineful commented on July 29, 2024

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.

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

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.

radulucaciu avatar radulucaciu commented on July 29, 2024

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.

imagineful avatar imagineful commented on July 29, 2024

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.

radulucaciu avatar radulucaciu commented on July 29, 2024

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.

imagineful avatar imagineful commented on July 29, 2024

Thanks. If you have further problems please feel free to let us know.

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.