BingAds / BingAds-Python-SDK

Other
117 stars 162 forks source link

ServiceClient creating fails for sandbox environment #2

Closed kil closed 9 years ago

kil commented 9 years ago

Instantiating a ServiceClient for CampaignManagementService fails with sandbox environment, e.g.

from bingads import ServiceClient

if __name__ == '__main__':
    service = ServiceClient('CampaignManagementService',
            authorization_data=None,
            environment='sandbox')

fails with:

Traceback (most recent call last):
  File "bin/python", line 146, in <module>
    exec(compile(__file__f.read(), __file__, "exec"))
  File "/tmp/a.py", line 6, in <module>
    environment='sandbox')
  File "/x/etc/eggs/bingads-9.3.2-py2.7.egg/bingads/service_client.py", line 31, in __init__
    self._soap_client = Client(self.service_url)
  File "/x/etc/eggs/suds_jurko-0.6-py2.7.egg/suds/client.py", line 115, in __init__
    self.wsdl = reader.open(url)
  File "/x/etc/eggs/suds_jurko-0.6-py2.7.egg/suds/reader.py", line 150, in open
    d = self.fn(url, self.options)
  File "/x/etc/eggs/suds_jurko-0.6-py2.7.egg/suds/wsdl.py", line 160, in __init__
    self.set_wrapped()
  File "/x/etc/eggs/suds_jurko-0.6-py2.7.egg/suds/wsdl.py", line 266, in set_wrapped
    raise TypeNotFound(query.ref)
suds.TypeNotFound: Type not found: '(SetNegativeSitesToAdGroups2Request, https://bingads.microsoft.com/CampaignManagement/v9, )'

The example works (no exception raised) if you change sandbox to production

eric-urban commented 9 years ago

Thanks for reporting this issue with the Campaign Management sandbox service. We are investigating and will follow up.

eric-urban commented 9 years ago

The sandbox deployment configuration issue is now resolved, and I am now able to initialize a ServiceClient for the CampaignManagementService. Thanks for your patience.