Re: OPERATOR_NOT_SUPPORTED when I trying to remove video id from adgroup (UniversalAppAd)

2019-08-16 Thread Google Ads API Forum Advisor Prod
Hello, instead of using the 'REMOVE' operator in your mutate request, please 
instead try using the 'SET' operator to update the ad itself. In doing so, 
specify what you would like the 'videos' array to look like after the operation 
is complete. So for example, if you had 1 video and wanted to remove it from 
the ad, you would specify an empty array. Keep in mind that although you are, 
in fact, removing the video from the ad, you are really just updating the 
details of the ad itself.

All the best,
Devin
The 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/6R7yv0PWCAX500Ji4-Qc5gRPG-a8DItsNvgQ%40sfdc.net.


Re: OPERATOR_NOT_SUPPORTED when I trying to remove video id from adgroup (UniversalAppAd)

2019-08-15 Thread 'Игорь Тирский' via AdWords API and Google Ads API Forum
Yes. I try to remove the video (or mediaId) from the campaign (but after 
changing API I can't remove mediaId from  

youtubeVideoMediaIds


list

I do not want to replace the video, I want to remove video from UAC campaign

My UAC campaign has this structure:

# 'id': 1693x,
# 'campaignGroupId': None,
# 'name': 'name',
# 'status': None,
# 'servingStatus': None,
# 'startDate': None,
# 'endDate': None,
# 'budget': None,
# 'conversionOptimizerEligibility': None,
# 'adServingOptimizationStatus': None,
# 'frequencyCap': None,
# 'settings': [
# {
# 'Setting.Type': 'GeoTargetTypeSetting',
# 'positiveGeoTargetType': 'DONT_CARE',
# 'negativeGeoTargetType': 'DONT_CARE'
# },
# {
# 'Setting.Type': 'UniversalAppCampaignSetting',
# 'appId': 'x',
# 'appVendor': '',
# 'description1': '',
# 'description2': '',
# 'description3': '',
# 'description4': '',
# 'youtubeVideoMediaIds': [123,123,456],



And I want to remove 123, for example.

But I rewrote code with AdService.mutate()

operations = [{
'operator': 'SET',
'operand': {
'id': 1234,#ad_id,
'xsi_type': 'UniversalAppAd',
'videos': [
{
'asset': {
'xsi_type': 'YouTubeVideoAsset',
'youTubeVideoId': 'Lvhv6',
'assetId': 123
},
},
],
},
}]

ad_service = client.GetService('AdService', version='v201809')
ad_service.mutate(operations)


And it required headlines and descriptions I added it:

*googleads.errors.GoogleAdsServerFault: [CollectionSizeError.TOO_FEW @ 
operations[0].operand.headlines, CollectionSizeError.TOO_FEW @ 
operations[0].operand.descriptions]*

Then I added headlines and descriptions:

'headlines': [{
"asset": {
"xsi_type": "TextAsset",
"assetId": 123,
"assetSubtype": "TEXT",
"Asset.Type": "TextAsset",
"assetText": ""
}}],
'descriptions': [{
"asset": {
"xsi_type": "TextAsset",
"assetId": 123,
"assetSubtype": "TEXT",
"Asset.Type": "TextAsset",
"assetText": ""
}}],


But after adding I've got this error

*googleads.errors.GoogleAdsServerFault: [CollectionSizeError.TOO_FEW @ 
operations[0].operand.headlines, CollectionSizeError.TOO_FEW @ 
operations[0].operand.descriptions]*

What I need to do, that to remove a video (mediaId) from UAC Campaign. 
Thanks!

четверг, 15 августа 2019 г., 9:50:37 UTC+3 пользователь adsapiforumadvisor 
написал:

> Hi,
>
> My apologies for the confusion. I can see that you wish to remove the 
> video itself from the ad. Could you, instead, try replacing the video 
> instead of removing it using the AdService.mutate() 
> 
> ?
>
> 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/baf01770-4734-4843-9f19-0fd2312983d0%40googlegroups.com.


Re: OPERATOR_NOT_SUPPORTED when I trying to remove video id from adgroup (UniversalAppAd)

2019-08-15 Thread Google Ads API Forum Advisor Prod
Hi,

My apologies for the confusion. I can see that you wish to remove the video 
itself from the ad. Could you, instead, try replacing the video instead of 
removing it using the AdService.mutate()?

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/U5eAL0PW9NyDe3g4t-SmOegpA9bkdplw%40sfdc.net.


Re: OPERATOR_NOT_SUPPORTED when I trying to remove video id from adgroup (UniversalAppAd)

2019-08-14 Thread 'Игорь Тирский' via AdWords API and Google Ads API Forum
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': 328973xx, #this is an ad_id
'xsi_type': 'UniversalAppAd',
'videos': [{
'asset': {
'xsi_type': 'YouTubeVideoAsset',
'youTubeVideoId': 'Lvhv6x', #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 
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 
> .
>  
> 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() 
> 
>  
> 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.


RE: OPERATOR_NOT_SUPPORTED when I trying to remove video id from adgroup (UniversalAppAd)

2019-08-14 Thread Google Ads API Forum Advisor Prod
Hi,

Thank you for reaching out.

Upon checking your code, I can see that you are using the AdService. 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() 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/kDzlx0PW7S2V00_hqG7DK6SHOKcbGZt4wHoA%40sfdc.net.