Hello.
I recently updated my Google Ads API client code from v17 to v18, but I’m
encountering an unexpected error. The same code was working perfectly in
v17. Here’s the error I get when running the updated version:
Request made: ClientCustomerId: XXXXXXXX, Host: googleads.googleapis.com,
Method:
/google.ads.googleads.v18.services.CampaignCriterionService/MutateCampaignCriteria,
RequestId: SWOL-Ui2pIBXa-EqsxY_Gw, IsFault: True, FaultMessage: The error
code is not in this version.
Here’s a simplified version of my code:
from google.ads.googleads.client import GoogleAdsClient
client = GoogleAdsClient.load_from_env(version="v17") # Changed to "v18"
campaign_criterion_service = client.get_service("CampaignCriterionService")
campaign_criterion_operation = client.get_type("CampaignCriterionOperation")
campaign_criterion = campaign_criterion_operation.create
campaign_criterion.campaign = "campaign_resource_nameXXXX"
campaign_criterion.language.language_constant = "languageConstants/1005" #
Japanese
campaign_criterion_service.mutate_campaign_criteria(
customer_id="customer_id", operations=[campaign_criterion_operation]
)
When I updated GoogleAdsClient.load_from_env(version="v17") to
version="v18", the error started appearing.
I checked the release notes for v18, but I couldn’t find any mention of
changes related to CampaignCriterionService or MutateCampaignCriteria.
I would appreciate any insights or suggestions for resolving this issue.
Thanks in advance!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/adwords-api/fbad2ef1-693c-40d9-be37-ac1f99021f53n%40googlegroups.com.