Hi, I just tried to replicate the error you're encountering, but the request succeeds for me. In case it helps, here's what my modified *update_keyword.py* file looks like:
operations = [{ 'operator': 'SET', 'operand': { 'adGroupId': ad_group_id, 'xsi_type': 'BiddableAdGroupCriterion', 'criterion': { 'id': criterion_id, }, 'trackingUrlTemplate': '{lpurl}?c1m_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}' } }] Could you let me know which version of Python you're using, and which version of the Python client library you're using? Thanks, Josh, AdWords API Team On Friday, June 3, 2016 at 3:36:57 AM UTC-4, Антон Сычугов wrote: > > Thanks a lot for quick response! > Yes, I'm using AdGroupCriterionService, API version 201601. > > suds logs: > 2016-06-03 10:30:58,683 DEBUG suds.xsd.query: ('mutate', ' > https://adwords.google.com/api/adwords/cm/v201601'), found as: > <Element:0x7fe7349fa390 name="mutate" /> > 2016-06-03 10:30:58,683 DEBUG suds.xsd.query: ('mutate', ' > https://adwords.google.com/api/adwords/cm/v201601'), found as: > <Element:0x7fe7349fa390 name="mutate" /> > 2016-06-03 10:30:58,684 DEBUG suds.mx.core: processing: > (Content){ > tag = "operations" > value = > { > operand = > { > trackingUrlTemplate = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > adGroupId = ... > criterion = > { > id = ... > } > } > operator = "SET" > } > type = <Element:0x7fe7349fa6d8 name="operations" > type="('AdGroupCriterionOperation', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > real = <Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation"> > <ComplexContent:0x7fe7343c22e8> > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', > 'http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" > type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension> > </ComplexContent> > </Complex> > } > 2016-06-03 10:30:58,684 DEBUG suds.mx.core: appending parent: > <suds.sax.document.Document object at 0x7fe72fa9bd68> > content: > (Content){ > tag = "operations" > value = > { > operand = > { > trackingUrlTemplate = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > adGroupId = ... > criterion = > { > id = ... > } > } > operator = "SET" > } > type = <Element:0x7fe7349fa6d8 name="operations" > type="('AdGroupCriterionOperation', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > real = <Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation"> > <ComplexContent:0x7fe7343c22e8> > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', > 'http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" > type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension> > </ComplexContent> > </Complex> > } > 2016-06-03 10:30:58,684 DEBUG suds.mx.literal: starting content: > (Content){ > tag = "operations" > value = > { > operand = > { > trackingUrlTemplate = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > adGroupId = ... > criterion = > { > id = ... > } > } > operator = "SET" > } > type = <Element:0x7fe7349fa6d8 name="operations" > type="('AdGroupCriterionOperation', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > real = <Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation"> > <ComplexContent:0x7fe7343c22e8> > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', > 'http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" > type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension> > </ComplexContent> > </Complex> > } > 2016-06-03 10:30:58,685 DEBUG suds.resolver: push: > (<suds.resolver.Frame object at 0x7fe72fa9be48>) > <suds.resolver.Frame object at 0x7fe72fa9be48> > 2016-06-03 10:30:58,685 DEBUG suds.mx.literal: created - node: > <tns:operations xmlns:tns=" > https://adwords.google.com/api/adwords/cm/v201601"/> > 2016-06-03 10:30:58,685 DEBUG suds.mx.core: appending parent: > <tns:operations xmlns:tns=" > https://adwords.google.com/api/adwords/cm/v201601"/> > content: > (Content){ > tag = "operator" > value = "SET" > } > 2016-06-03 10:30:58,685 DEBUG suds.mx.literal: starting content: > (Content){ > tag = "operator" > value = "SET" > } > 2016-06-03 10:30:58,686 DEBUG suds.resolver: searching parent > (<Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation" />) for (operator) > 2016-06-03 10:30:58,686 DEBUG suds.xsd.sxbasic: Element:0x7fe72fbd9128, > resolving: ('Operator', 'https://adwords.google.com/api/adwords/cm/v201601 > ') > using:(TypeQuery){ > id = "TypeQuery:0x7fe72fbfb5c0" > ref[] = > "Operator", > "https://adwords.google.com/api/adwords/cm/v201601", > history[] = > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" />, > resolved = False > } > 2016-06-03 10:30:58,686 DEBUG suds.xsd.query: ('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601'), found as: > <Simple:0x7fe72faf4198 name="Operator" /> > 2016-06-03 10:30:58,686 DEBUG suds.resolver: push: > (<suds.resolver.Frame object at 0x7fe72fbfb550>) > <suds.resolver.Frame object at 0x7fe72fa9be48> > <suds.resolver.Frame object at 0x7fe72fbfb550> > 2016-06-03 10:30:58,686 DEBUG suds.mx.literal: created - node: > <tns:operator xmlns:tns="https://adwords.google.com/api/adwords/cm/v201601 > "/> > 2016-06-03 10:30:58,686 DEBUG suds.mx.literal: ending content: > (Content){ > tag = "operator" > value = "SET" > type = <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > real = <Simple:0x7fe72faf4198 name="Operator"> > <Restriction:0x7fe7349f6470 ref="('string', ' > http://www.w3.org/2001/XMLSchema')"> > <Enumeration:0x7fe7349f64e0 name="ADD" /> > <Enumeration:0x7fe7349f6518 name="REMOVE" /> > <Enumeration:0x7fe7349f6550 name="SET" /> > </Restriction> > </Simple> > ancestry[] = > <Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation"> > <ComplexContent:0x7fe7343c22e8> > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', > 'http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" > type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension> > </ComplexContent> > </Complex>, > <ComplexContent:0x7fe7343c22e8> > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', ' > http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" type="('AdGroupCriterion', > 'https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension> > </ComplexContent>, > <Extension:0x7fe7343c2710 ref="('Operation', ' > https://adwords.google.com/api/adwords/cm/v201601')"> > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', ' > http://www.w3.org/2001/XMLSchema')" /> > </Sequence> > <Sequence:0x7fe7343c2860> > <Element:0x7fe7343c2a20 name="operand" type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe7343c2a58 name="exemptionRequests" > type="('ExemptionRequest', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > </Sequence> > </Extension>, > <Sequence:0x7fe72fbd9048> > <Element:0x7fe72fbd9128 name="operator" type="('Operator', ' > https://adwords.google.com/api/adwords/cm/v201601')" /> > <Element:0x7fe72fbd9160 name="Operation.Type" type="('string', ' > http://www.w3.org/2001/XMLSchema')" /> > </Sequence>, > } > 2016-06-03 10:30:58,687 DEBUG suds.resolver: pop: (<suds.resolver.Frame > object at 0x7fe72fbfb550>) > <suds.resolver.Frame object at 0x7fe72fa9be48> > 2016-06-03 10:30:58,687 DEBUG suds.mx.core: appending parent: > <tns:operations xmlns:tns=" > https://adwords.google.com/api/adwords/cm/v201601"> > <tns:operator>SET</tns:operator> > </tns:operations> > content: > (Content){ > tag = "operand" > value = > { > trackingUrlTemplate = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > adGroupId = ... > criterion = > { > id = ... > } > } > } > 2016-06-03 10:30:58,687 DEBUG suds.mx.literal: starting content: > (Content){ > tag = "operand" > value = > { > trackingUrlTemplate = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > adGroupId = ... > criterion = > { > id = ... > } > } > } > 2016-06-03 10:30:58,687 DEBUG suds.resolver: searching parent > (<Complex:0x7fe7349c1e80 name="AdGroupCriterionOperation" />) for (operand) > 2016-06-03 10:30:58,687 DEBUG suds.xsd.sxbasic: Element:0x7fe7343c2a20, > resolving: ('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601') > using:(TypeQuery){ > id = "TypeQuery:0x7fe72fbfb780" > ref[] = > "AdGroupCriterion", > "https://adwords.google.com/api/adwords/cm/v201601", > history[] = > <Element:0x7fe7343c2a20 name="operand" type="('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601')" />, > resolved = False > } > 2016-06-03 10:30:58,687 DEBUG suds.xsd.query: ('AdGroupCriterion', ' > https://adwords.google.com/api/adwords/cm/v201601'), found as: > <Complex:0x7fe7349c12b0 name="AdGroupCriterion" /> > 2016-06-03 10:30:58,687 DEBUG suds.resolver: push: > (<suds.resolver.Frame object at 0x7fe72fbfb128>) > <suds.resolver.Frame object at 0x7fe72fa9be48> > <suds.resolver.Frame object at 0x7fe72fbfb128> > 2016-06-03 10:30:58,688 DEBUG suds.mx.literal: created - node: > <tns:operand xmlns:tns="https://adwords.google.com/api/adwords/cm/v201601 > "/> > 2016-06-03 10:30:58,688 DEBUG suds.sudsobject: ['trackingUrlTemplate', > 'adGroupId', 'criterion'] must be superset of [adGroupId, criterionUse, > criterion, labels, forwardCompatibilityMap, AdGroupCriterion.Type], > ordering ignored > 2016-06-03 10:30:58,688 DEBUG suds.mx.core: appending parent: > <tns:operand/> > content: > (Content){ > tag = "trackingUrlTemplate" > value = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > } > 2016-06-03 10:30:58,688 DEBUG suds.mx.literal: starting content: > (Content){ > tag = "trackingUrlTemplate" > value = > "{lpurl}?cm_id={campaignid}_{adgroupid}_{creative}_{targetid}_{device}_{adposition}_{network}_{placement}" > } > 2016-06-03 10:30:58,688 DEBUG suds.resolver: searching parent > (<Complex:0x7fe7349c12b0 name="AdGroupCriterion" />) for > (trackingUrlTemplate) > > It seems that I have to defend inheritance some how. > > > четверг, 2 июня 2016 г., 21:51:05 UTC+3 пользователь Shwetha Vastrad > (AdWords API Team) написал: >> >> Hi, >> >> Can you confirm that you are using the AdGroupCriterionService? This is >> likely the case where the incorrect service is being used. Could you >> provide the output logs when you try to update the criterion? You can find >> the instruction to enable logging for the python client library here >> <https://github.com/googleads/googleads-python-lib#how-do-i-log-soap-interactions> >> . >> >> Thanks, >> Shwetha, AdWords API Team. >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/6d818984-c103-4de3-b7ac-9a1f62ee99f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.