I wanted to update this with further information pertaining to GeoTargets. I think this may be a more general issue with how you are wrapping the new campaign targeting logic with these campaign criterion. I cannot remove a GeoTarget and add it as a negative GeoTarget in the same operation. It is being flagged as excluding and including the same targeting a location which is invalid. This is either an incorrect assessment of what the operation is attempting to do, or the order of operations is not being honored and the requests will need to be sent separately to the server. I will split delete and add operations into separate requests to the server, but you may also wish to fix this. Below I've included one sample request.
Thanks, Peter [2012-02-17 14:40:22,702::WARNING::AwApi-Python-15.1.4] StartTime: 2012-02-17 14:40:22 *** Outgoing HTTP headers ********************************************** POST /api/adwords/cm/v201109/CampaignCriterionService HTTP/1.0 Host:adwords.google.com User-agent:SOAPpy 0.12.0 (pywebsvcs.sf.net),gzip XML-parser: cElementTree v1.0.6a2 Content-type:text/xml; charset="UTF-8" Content-length:3500 SOAPAction:"mutate" ************************************************************************ *** Outgoing SOAP ****************************************************** <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi3="http://www.w3.org/2001/XMLSchema-instance" > <SOAP-ENV:Header xmlns="https://adwords.google.com/api/adwords/cm/ v201109" xmlns:cm="https://adwords.google.com/api/adwords/cm/v201109"> <RequestHeader> <cm:developerToken>xxxxxxxxxxxxxxxxxx</cm:developerToken> <cm:userAgent>AwApi-Python-15.1.4|Test Client</cm:userAgent> <cm:authToken>xxxxxxxxxxxxxxxx</cm:authToken> <cm:clientCustomerId>xxxxxxxxxx</cm:clientCustomerId> </RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201109" xmlns:cm="https://adwords.google.com/api/adwords/cm/v201109"> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>REMOVE</cm:operator> <cm:operand xsi3:type="cm:CampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1026730</cm:id> </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>REMOVE</cm:operator> <cm:operand xsi3:type="cm:CampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1018426</cm:id> </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>REMOVE</cm:operator> <cm:operand xsi3:type="cm:CampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1018277</cm:id> </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>ADD</cm:operator> <cm:operand xsi3:type="cm:NegativeCampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1026730</cm:id> ************************************* </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>ADD</cm:operator> <cm:operand xsi3:type="cm:NegativeCampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1027460</cm:id> </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>ADD</cm:operator> <cm:operand xsi3:type="cm:NegativeCampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1013386</cm:id> </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>ADD</cm:operator> <cm:operand xsi3:type="cm:NegativeCampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1018426</cm:id> ************************************* </cm:criterion> </cm:operand> </operations> <operations xsi3:type="cm:CampaignCriterionOperation"> <cm:operator>ADD</cm:operator> <cm:operand xsi3:type="cm:NegativeCampaignCriterion"> <cm:campaignId>89199199</cm:campaignId> <cm:criterion xsi3:type="cm:Location"> <cm:id>1018277</cm:id> ************************************* </cm:criterion> </cm:operand> </operations> </mutate> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ************************************************************************ *** Incoming HTTP headers ********************************************** HTTP/1.? 500 Internal Server Error Content-Type: text/xml; charset=UTF-8 Date: Fri, 17 Feb 2012 19:40:22 GMT Expires: Fri, 17 Feb 2012 19:40:22 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE ************************************************************************ *** Incoming SOAP ****************************************************** <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/ v201109"> <requestId>0004b92e1d902a000a3459e800001ab6</requestId> <serviceName>CampaignCriterionService</serviceName> <methodName>mutate</methodName> <operations>3</operations> <responseTime>188</responseTime> <units>3</units> </ResponseHeader> </soap:Header> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>[CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[3].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[6].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[7].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[3].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[6].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[7].operand.criterion]</faultstring> <detail> <ApiExceptionFault xmlns="https://adwords.google.com/api/ adwords/cm/v201109"> <message>[CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[3].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[6].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[7].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[3].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[6].operand.criterion, CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE @ operations[7].operand.criterion]</message> <ApplicationException.Type>ApiException</ ApplicationException.Type> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[3].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[6].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[7].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[3].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[6].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:type="CampaignCriterionError"> <fieldPath>operations[7].operand.criterion</fieldPath> <trigger></trigger> <errorString>CampaignCriterionError.CANNOT_TARGET_AND_EXCLUDE</ errorString> <ApiError.Type>CampaignCriterionError</ApiError.Type> <reason>UNKNOWN</reason> </errors> </ApiExceptionFault> </detail> </soap:Fault> </soap:Body> </soap:Envelope> ************************************************************************ EndTime: 2012-02-17 14:40:22 On Feb 10, 11:42 am, David Torres <davi...@google.com> wrote: > Hi Peter, > > Thanks for reporting this issue, it is just a mishandling of the error. > I'll communicate it to the team to have it fixed. > > Best, > > -David Torres - AdWords API Team -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en