Trying to do it, but

I'm using this doc 
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.UniversalAppAd

operations = [{
    'operator': 'REMOVE',
    'operand': {
        'id': 328973xxxxxx, #this is an ad_id
        'xsi_type': 'UniversalAppAd',
        'videos': [{
            'asset': {
                'xsi_type': 'YouTubeVideoAsset',
                'youTubeVideoId': 'Lvhv6xxxxx', #youtube video id

            }
        }]
    }
}]

ad_service = client.GetService('AdGroupAdService', version='v201809')



And got an error:

Error summary: {'faultMessage': "Unmarshalling Error: cvc-elt.4.3: Type 
'ns0:UniversalAppAd' is not validly derived from the type definition, 
'AdGroupAd', of element 'ns0:operand'. ", 'serviceName': 
'AdGroupAdService', 'methodName': 'mutate'}
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py",
 
line 992, in MakeSoapRequest
    *packed_args, _soapheaders=soap_headers)['body']['rval']
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/proxy.py",
 
line 42, in __call__
    self._op_name, args, kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py",
 
line 132, in send
    return self.process_reply(client, operation_obj, response)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py",
 
line 194, in process_reply
    return self.process_error(doc, operation)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py",
 
line 299, in process_error
    detail=fault_node.find('detail'))
*zeep.exceptions.Fault: Unmarshalling Error: cvc-elt.4.3: Type 
'ns0:UniversalAppAd' is not validly derived from the type definition, 
'AdGroupAd', of element 'ns0:operand'. *

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/i.tirsky/PycharmProjects/googleadw/campaign_mutate.py", line 
152, in <module>
    c.remove_media_ids()
  File "/Users/i.tirsky/PycharmProjects/googleadw/campaign_mutate.py", line 
88, in remove_media_ids
    ads = ad_service.mutate(operations)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/googleads/common.py",
 
line 1004, in MakeSoapRequest
    e.detail, errors=error_list, message=e.message)
*googleads.errors.GoogleAdsServerFault: Unmarshalling Error: cvc-elt.4.3: 
Type 'ns0:UniversalAppAd' is not validly derived from the type definition, 
'AdGroupAd', of element 'ns0:operand'.* 

среда, 14 августа 2019 г., 9:45:10 UTC+3 пользователь adsapiforumadvisor 
написал:
>
> Hi,
>
> Thank you for reaching out.
>
> Upon checking your code, I can see that you are using the AdService 
> <https://developers.google.com/adwords/api/docs/reference/v201809/AdService#mutate>.
>  
> As per the link provided, this service can only support SET operator. This 
> is the reason why you are encountering the 
> error OPERATOR_NOT_SUPPORTED. You can use the AdGroupAdService.mutate() 
> <https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService#mutate>
>  
> instead to remove the ad from the ad group instead. Unfortunately, we do 
> not have an exact sample code on how to remove videos from Universal App 
> Campaigns.
>
> Regards,
> Dannison
> Google Ads API Team
>
> ref:_00D1U1174p._5001UEIvKC:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cb4bf577-24fc-4c91-aa6d-2cf98d8ce575%40googlegroups.com.
  • OPERA... 'Игорь Тирский' via AdWords API and Google Ads API Forum
    • ... Google Ads API Forum Advisor Prod
      • ... 'Игорь Тирский' via AdWords API and Google Ads API Forum
    • ... Google Ads API Forum Advisor Prod
      • ... 'Игорь Тирский' via AdWords API and Google Ads API Forum
    • ... Google Ads API Forum Advisor Prod

Reply via email to