Hi,
I'm using your google ads library for python
When I'm trying to set device for a campaign I'm receiving an error from
Google ADS API
operations = []
if data['desktop']:
campaign_criterion_operation =
self.client.get_type('CampaignCriterionOperation', version='v1')
campaign_criterion = campaign_criterion_operation.create
campaign_criterion.campaign.value = campaign_resource_name
campaign_criterion.device.type =
self.client.get_type('DeviceEnum').DESKTOP
operations.append(campaign_criterion_operation)
if operations:
campaign_criterion_service =
self.client.get_service('CampaignCriterionService', version='v1)
campaign_criterion_response =
campaign_criterion_service.mutate_campaign_criteria(
self.customer_id, operations)
Error:
GoogleAdsException at <app_url>
(<_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string =
"{"created":"@1561531088.389712000","description":"Error received from peer
ipv4:216.58.215.106:443","file":"src/core/lib/surface/call.cc","file_line":1046,"grpc_message":"Request
contains an invalid argument.","grpc_status":3}"
>, <_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string =
"{"created":"@1561531088.389712000","description":"Error received from peer
ipv4:216.58.215.106:443","file":"src/core/lib/surface/call.cc","file_line":1046,"grpc_message":"Request
contains an invalid argument.","grpc_status":3}"
>, errors {
error_code {
campaign_criterion_error: OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE
}
message: "This operator cannot be applied to a criterion of this type."
trigger {
string_value: ""
}
location {
field_path_elements {
field_name: "operations"
index {
}
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "device"
}
}
}
Is there something that I forgot to add to code? Or should I do in another
way to change device settings for the campaign?
I noticed that I have a created campaign criteria for devices to selected
campaign but I cant update or remove these criteria
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/4c1a6232-426f-4c24-acea-a3033084fdce%40googlegroups.com.