Hi Dannison,

It's not an issue with the comma. The same request with STRING works just 
fine. This is the soap log:

[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'}





Please let me know if you find the issue!
Thank you!

On Tuesday, December 4, 2018 at 8:10:25 AM UTC+2, Dannison Yao (AdWords API 
Team) wrote:
>
> Hi Costantin,
>
> Upon comparing your code to the sample code provided here 
> <https://developers.google.com/adwords/api/docs/guides/ad-customizers#set_up_the_feed>,
>  
> I am seeing unnecessary commas, could you try the code snippet below which 
> I have removed the commas?
>
> customizer_feed = {
>  'feedName': feed_name,
>  'feedAttributes': [
>      {'type': 'STRING', 'name': 'some string name'},
>      {'type': 'INT64', 'name': 'Int Name'}
>  ]
> }
>
>
> If the error is still persisting after trying the above suggestion, please 
> send the complete SOAP request and response log so we could investigate 
> this further. To enable SOAP logs on Python you can follow this guide 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fgoogleads%2Fgoogleads-python-lib%23how-do-i-log-soap-interactions&sa=D&sntz=1&usg=AFQjCNFk9837DyzoXqwZr8D5qe8biaDzXQ>
> .
>
> Regards,
> Dannison
> AdWords API Team
>
> On Monday, December 3, 2018 at 9:16:21 PM UTC+8, cos...@gmail.com 
> <javascript:> wrote:
>>
>> Di Dannison,
>>
>> This is the full request:
>>
>>  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])
>>
>> The mutate fails and gives me this:
>>
>> 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]
>>
>>
>> This identical request with 'STRING' as the type for the second element (Int 
>> Name) works without any issue. 
>>
>> Please let me know if I can provide more info. 
>>
>> p.s. I'm using the official python library with Python 3.6
>>
>> On Thursday, November 29, 2018 at 11:19:39 PM UTC+2, Dannison Yao 
>> (AdWords API Team) wrote:
>>>
>>> Hi Costantin,
>>>
>>> The RequiredError.REQUIRED 
>>> <https://developers.google.com/adwords/api/docs/common-errors#RequiredError.REQUIRED>
>>>  only 
>>> error occurs when there are missing required fields.
>>>
>>> Can you provide the complete XML SOAP request and response logs so we 
>>> can investigate this further? You may use the *R**eply privately to 
>>> author *option. If you have not enabled the logging, you can tell me 
>>> what client library you are using so I can point you to the proper guide.
>>>
>>> Regards,
>>> Dannison
>>> AdWords API Team
>>>
>>> On Friday, November 30, 2018 at 12:22:31 AM UTC+8, cos...@gmail.com 
>>> wrote:
>>>>
>>>> I'm trying to add a customizer via the API. I would like to add it as 
>>>> an integer or float. I do the following:
>>>>
>>>> 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])
>>>>
>>>> The code above works, however, If I replace STRING with INT64 or FLOAT I 
>>>> get the following error:
>>>>
>>>> googleads.errors.GoogleAdsServerFault: [RequiredError.REQUIRED @ 
>>>> operations[0].operand.feedAttributes[1].type]
>>>>
>>>> I thought that the valid field types are these ones  
>>>> <https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.FeedAttribute.Type>-
>>>>  
>>>> Why it doesn't work?
>>>>
>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/01e86c1c-152a-441b-8265-ef5c88f624fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... cosbgn
    • ... 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... cosbgn
        • ... 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
          • ... cosbgn
            • ... 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
              • ... Costantin
                • ... 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to