FYI, the maintainer of the Python client library created this bug entry for tracking purposes
http://code.google.com/p/google-api-adwords-python-lib/issues/detail?id=51 Cheers, -Jeff Posnick, AdWords API Team On Jan 20, 4:16 pm, AdWords API Advisor <[email protected]> wrote: > Thanks, David, I'll bring that to the attention of the Python client > library maintainer. For future reference, feel free to open a bug in > the public issue tracker for the Python client library if you ever > encounter anything similar: > > http://code.google.com/p/google-api-adwords-python-lib/issues/list > > Cheers, > -Jeff Posnick, AdWords API Team > > On Jan 20, 3:37 am, david <[email protected]> wrote: > > > Hi, > > > In call to AddCampaign, I was passing the following campaign: > > > campaign = {'status': 'Paused', > > 'contentTargeting': 'SelectedPlacements', > > 'budgetAmount': '20000000', > > 'budgetPeriod': 'Daily', > > 'name': 'c4d3_xyz_placement', > > 'networkTargeting': ['ContentNetwork'], > > 'languageTargeting': ['en'], > > 'budgetOptimizerSettings': {'enabled': 'false'}, > > 'geoTargeting': {'cityTargets': {'cities': ['Ft Lauderdale, FL US']}, > > 'proximityTargets': {'circles': [{'radiusMeters': '32186', > > 'longitudeMicroDegrees': '-80139836', 'latitudeMicroDegrees': > > '26102348'}]}}, > > 'conversionOptimizerSettings': {'enabled': False} > > > } > > > I would get the following error: > > > Traceback (most recent call last): > > File "./create_adwords.py", line 1209, in <module> > > add_new_campaign_set(sitename, campaign_types=["placement"], > > groupnames=["implants"]) > > File "./create_adwords.py", line 801, in add_new_campaign_set > > cid = create_campaign(sitename, campaign_type) > > File "./create_adwords.py", line 651, in create_campaign > > status = campaign_service.AddCampaign(campaign) > > File "/home/dg/projects/awapi_python_lib_3.3.0/aw_api/ > > CampaignService.py", line 166, in AddCampaign > > return self.__service.CallMethod(method_name, (campaign)) > > File "/home/dg/projects/awapi_python_lib_3.3.0/aw_api/ > > WebService.py", line 202, in CallMethod > > self.__ManageSoap(buffer, start_time, stop_time, is_fault, error) > > File "/home/dg/projects/awapi_python_lib_3.3.0/aw_api/ > > WebService.py", line 123, in __ManageSoap > > raise Errors.Error(msg) > > aw_api.Errors.Error: Error: faultcode: soapenv:Server.userException > > faultstring: java.lang.IllegalArgumentException: Can not set > > com.google.ads.netapi.services.datamodel.ContentTargeting field > > com.google.ads.netapi.services.campaign.CampaignData.contentTargeting > > to java.lang.String > > > My fix was the following: > > > in the awapi lib 3.3.0/aw_api/soappy_toolkit/SanityCheck.py: > > > in function: ValidateCampaignV13(): > > > add two lines before the last "else": > > > elif key == 'contentTargeting': > > campaign[key] = UnType(campaign[key]) > > > I'm sure the folks at Google can fix this a little better! > > > David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~----------~----~----~----~------~----~------~--~---
