Hi Jeff, First of all, thanks for your time :)
I'm not currently using Google Client Library, I'm calling it using SOAPpy. The code I'm trying to use is almost the same that appears here on the following example: http://code.google.com/p/adwords-api-python-samples/source/browse/trunk/src/check_keyword_traffic.py?r=3 The only difference is that instead of one item, I'm trying to embed several items (as you know). The SOAPpy.Types.untypedType is needed for "keywordType" because otherwise, I receive an error saying: soapenv:Server.userException: java.lang.IllegalArgumentException: Can not set com.google.ads.netapi.services.datamodel.KeywordType field com.google.ads.netapi.services.datamodel.keywordtraffic.KeywordTrafficRequest.keywordType to java.lang.String[...] This situation is weird, because for example, on other part of my code I use the "checkCriteria" call of "CriterionService", that also takes a list of keywords, and that call works perfect. That's why I'm not able to understand what is happening with checkKeywordTraffic/estimateKeywordList. Maybe would be a good idea to start using the google client library (awapi), but I have a lot of code that works perfectly fine now, and I prefer solving this issue (on the other hand, if I'm not unable to do this, I will perform the call for each keyword, but that will be really slow for a thousand items). Any other ideas or suggestions are welcome, Thanks, Pau Sanchez On Dec 3, 8:01 pm, AdWords API Advisor <[EMAIL PROTECTED]> wrote: > Hello Pau, > > I can't reproduce that, regardless of whether I'm using SOAPpy or ZSI > with the Python client library. I'm using the 3.3.1 release of the > Python client library, and a variety of other versions for the other > dependencies, and Python 2.5... there's unfortunately a lot of moving > parts regarding Python dependencies. > > One difference I see between your code and mine is that I had to get > rid of the SOAPpy.Types.untypedType() wrapper and just pass in the > bare strings in order to make the client library happy, so I think > you're definitely using a different (older) version of one of the > dependencies. > > Could you try updating your client library to 3.3.1 and the other > relevant dependencies and see if the problem persists? > > Cheers, > -Jeff Posnick, AdWords API Team > > On Dec 3, 12:20 pm, Pau Sanchez <[EMAIL PROTECTED]> wrote: > > > According to API > > dochttp://code.google.com/apis/adwords/docs/developer/TrafficEstimatorSe... > > checkKeywordTraffic receives a list of KeywordTrafficRequest. > > > I've done lots of tests, and I'm unable to pass a list of more than > > one elements. > > > I'm using python and adwords API v13. > > > This example works perfect: > > newKeywordsList = [] > > keywordItem = { > > 'keywordText': 'keyword one', > > 'keywordType': SOAPpy.Types.untypedType('Exact'), > > 'language' : 'en' > > } > > newKeywordsList.append (keywordItem) > > estimation = estimator_service.checkKeywordTraffic (newKeywordsList) > > > But, then, if I add another item to the list, it fails. Here is an > > example of adding two items: > > keywordItem = { > > 'keywordText': 'keyword one', > > 'keywordType': SOAPpy.Types.untypedType('Exact'), > > 'language' : 'en' > > } > > > keywordItem2 = { > > 'keywordText': 'keyword two', > > 'keywordType': SOAPpy.Types.untypedType('Exact'), > > 'language' : 'en' > > } > > > newKeywordsList = [] > > newKeywordsList.append (keywordItem) > > newKeywordsList.append (keywordItem2) > > > estimation = estimator_service.checkKeywordTraffic (newKeywordsList) > > > The code above produces the following error: > > SOAPpy.Types.faultType: <Fault soapenv:Server.userException: > > org.xml.sax.SAXException: SimpleDeserializer encountered a child > > element, which is NOT expected, in something it was trying to > > deserialize. [...] > > > I am using the sandbox for developing my script. This problem also > > happens for estimateKeywordList on the sandbox. > > > Anyone has an idea of what am I doing wrong, or why it's not working > > at all? > > Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
