customizer_feed = { 'feedName': feed_name, 'feedAttributes': [ {'type': 'STRING', 'name': 'a'}, ], } feed_service_operation = {'operator': 'ADD', 'operand': customizer_feed}
response = ad_customizer_feed_service.mutate([feed_service_operation])
googleads.errors.GoogleAdsServerFault: [RequiredError.REQUIRED @ operations[0].operand.feedAttributes[1].type]
ad_customizer_feed_service = client.GetService("AdCustomizerFeedService", version='v201809')
feed_name = "feed_xyz"
customizer_feed = {
'feedName': feed_name,
'feedAttributes': [
{'type': 'STRING', 'name': 'some string name'},
{'type': 'INT64', 'name': 'Int Name'},
],
}
# Types: https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.FeedAttribute
feed_service_operation = {'operator': 'ADD', 'operand': customizer_feed}
response = ad_customizer_feed_service.mutate([feed_service_operation])Error summary: {'faultMessage': '[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[1].type]', 'requestId': '00057c1de8XXXXXX', 'serviceName': 'AdCustomizerFeedService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '311'}
......
line 1394, in MakeSoapRequest
e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: [RequiredError.REQUIRED @ operations[0].operand.feedAttributes[1].type]
customizer_feed = {
'feedName': feed_name,
'feedAttributes': [
{'type': 'STRING', 'name': 'some string name'},
{'type': 'INT64', 'name': 'Int Name'}
]
}
[2018-12-04 12:33:45,246 - googleads.soap - INFO] Request made: Service: "AdCustomizerFeedService" Method: "mutate" URL: "https://adwords.google.com/api/adwords/cm/v201809/AdCustomizerFeedService"
[2018-12-04 12:33:45,249 - googleads.soap - DEBUG] Outgoing request: {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 'authorization': 'REDACTED'}
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<ns0:RequestHeader xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
<ns0:clientCustomerId>19XXXX</ns0:clientCustomerId>
<ns0:developerToken>REDACTED</ns0:developerToken>
<ns0:userAgent>unknown (AwApi-Python, googleads/15.0.0, Python/3.6.3, zeep)</ns0:userAgent>
<ns0:validateOnly>false</ns0:validateOnly>
<ns0:partialFailure>false</ns0:partialFailure>
</ns0:RequestHeader>
</soap-env:Header>
<soap-env:Body>
<ns0:mutate xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
<ns0:operations>
<ns0:operator>ADD</ns0:operator>
<ns0:operand>
<ns0:feedName>XYZ_475D6Z</ns0:feedName>
<ns0:feedAttributes>
<ns0:name>price</ns0:name>
<ns0:type>FLOAT</ns0:type>
</ns0:feedAttributes>
</ns0:operand>
</ns0:operations>
</ns0:mutate>
</soap-env:Body>
</soap-env:Envelope>
[2018-12-04 12:33:45,603 - googleads.soap - DEBUG] Incoming response:
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n <soap:Header>\n <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n <requestId>00057c2fccd4e220XXX</requestId>\n <serviceName>AdCustomizerFeedService</serviceName>\n <methodName>mutate</methodName>\n <operations>1</operations>\n <responseTime>137</responseTime>\n </ResponseHeader>\n </soap:Header>\n <soap:Body>\n <soap:Fault>\n <faultcode>soap:Client</faultcode>\n <faultstring>[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]</faultstring>\n <detail>\n <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n <message>[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]</message>\n <ApplicationException.Type>ApiException</ApplicationException.Type>\n <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">\n <fieldPath>operations[0].operand.feedAttributes[0].type</fieldPath>\n <fieldPathElements>\n <field>operations</field>\n <index>0</index>\n </fieldPathElements>\n <fieldPathElements>\n <field>operand</field>\n </fieldPathElements>\n <fieldPathElements>\n <field>feedAttributes</field>\n <index>0</index>\n </fieldPathElements>\n <fieldPathElements>\n <field>type</field>\n </fieldPathElements>\n <trigger/>\n <errorString>RequiredError.REQUIRED</errorString>\n <ApiError.Type>RequiredError</ApiError.Type>\n <reason>REQUIRED</reason>\n </errors>\n </ApiExceptionFault>\n </detail>\n </soap:Fault>\n </soap:Body>\n</soap:Envelope>\n'
[2018-12-04 12:33:45,605 - googleads.soap - WARNING] Error summary: {'faultMessage': '[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]', 'requestId': '00057c2fccd4e2200aXXXXXX', 'serviceName': 'AdCustomizerFeedService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '137'}
ad_customizer_feed_service = client.GetService("AdCustomizerFeedService", version='v201809')
customizer_feed = {
'feedName': 'feed name xyz',
'feedAttributes': [{'type': 'STRING', 'name': 'this is the column name'}]}
feed_service_operation = {'operator': 'ADD', 'operand': customizer_feed}
response = ad_customizer_feed_service.mutate([feed_service_operation])
if response and 'value' in response: r = "VALID: {}".format(response)
else: r = "NOT VALID: {}".format(response)
return r ad_customizer_feed_service = client.GetService("AdCustomizerFeedService", version='v201809')
customizer_feed = {
'feedName': 'feed name xyz 2',
'feedAttributes': [{'type': 'INT64', 'name': 'this is the column name 2'}]
}
feed_service_operation = {'operator': 'ADD', 'operand': customizer_feed}
response = ad_customizer_feed_service.mutate([feed_service_operation])
if response and 'value' in response: r = "VALID: {}".format(response)
else: r = "NOT VALID: {}".format(response)
print(r)
return rgoogleads.errors.GoogleAdsServerFault: [RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]
[2018-12-05 12:39:41,601 - googleads.soap - INFO] Request made: Service: "AdCustomizerFeedService" Method: "mutate" URL: "https://adwords.google.com/api/adwords/cm/v201809/AdCustomizerFeedService"
[2018-12-05 12:39:41,601 - googleads.soap - DEBUG] Outgoing request: {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 'authorization': 'REDACTED'}
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<ns0:RequestHeader xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
<ns0:clientCustomerId>197XXXXXX</ns0:clientCustomerId>
<ns0:developerToken>REDACTED</ns0:developerToken>
<ns0:userAgent>unknown (AwApi-Python, googleads/15.0.0, Python/3.6.3, zeep)</ns0:userAgent>
<ns0:validateOnly>false</ns0:validateOnly>
<ns0:partialFailure>false</ns0:partialFailure>
</ns0:RequestHeader>
</soap-env:Header>
<soap-env:Body>
<ns0:mutate xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
<ns0:operations>
<ns0:operator>ADD</ns0:operator>
<ns0:operand>
<ns0:feedName>feed name xyz 2</ns0:feedName>
<ns0:feedAttributes>
<ns0:name>this is the column name 2</ns0:name>
<ns0:type>INT64</ns0:type>
</ns0:feedAttributes>
</ns0:operand>
</ns0:operations>
</ns0:mutate>
</soap-env:Body>
</soap-env:Envelope>
[2018-12-05 12:39:42,717 - googleads.soap - DEBUG] Incoming response:
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n <soap:Header>\n <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n <requestId>00057c43ffeXXXXXXX</requestId>\n <serviceName>AdCustomizerFeedService</serviceName>\n <methodName>mutate</methodName>\n <operations>1</operations>\n <responseTime>520</responseTime>\n </ResponseHeader>\n </soap:Header>\n <soap:Body>\n <soap:Fault>\n <faultcode>soap:Client</faultcode>\n <faultstring>[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]</faultstring>\n <detail>\n <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n <message>[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]</message>\n <ApplicationException.Type>ApiException</ApplicationException.Type>\n <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">\n <fieldPath>operations[0].operand.feedAttributes[0].type</fieldPath>\n <fieldPathElements>\n <field>operations</field>\n <index>0</index>\n </fieldPathElements>\n <fieldPathElements>\n <field>operand</field>\n </fieldPathElements>\n <fieldPathElements>\n <field>feedAttributes</field>\n <index>0</index>\n </fieldPathElements>\n <fieldPathElements>\n <field>type</field>\n </fieldPathElements>\n <trigger/>\n <errorString>RequiredError.REQUIRED</errorString>\n <ApiError.Type>RequiredError</ApiError.Type>\n <reason>REQUIRED</reason>\n </errors>\n </ApiExceptionFault>\n </detail>\n </soap:Fault>\n </soap:Body>\n</soap:Envelope>\n'
[2018-12-05 12:39:42,718 - googleads.soap - WARNING] Error summary: {'faultMessage': '[RequiredError.REQUIRED @ operations[0].operand.feedAttributes[0].type]', 'requestId': '00057c43ffe9XXXXXXX', 'serviceName': 'AdCustomizerFeedService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '520'}