Hi all,
For the past 3 weeks I have been trying to upload an image using Ads API
but I'm constantly receiving the following error:
Request made: ClientCustomerId: 5497809701, Host: googleads.googleapis.com:443,
Method: /google.ads.googleads.v2.services.AdService/MutateAds, RequestId:
jksvO9WJsAfBiMQHZPHNqg, IsFault: True, FaultMessage: The error code is not in
this version.
Request with ID "jksvO9WJsAfBiMQHZPHNqg" failed with status "INVALID_ARGUMENT"
and includes the following errors:
Error with message "The error code is not in this version.".
On field: operations
On field: update
On field: app_ad
On field: images
On field: asset
However, I have been using the same code since last October and never faced
this kind of error. Does anybody know if something changed in the API or in the
endpoint?
Here is a snippet of my code:
##############################################
# Creating new image #
##############################################
# Media service
media_file_service = client.get_service('MediaFileService',
version='v2')
# Media operation service
media_file_operation = client.get_type('MediaFileOperation',
version='v2')
# Create IMAGE media file
media_file_resource_name =
create_image(client,customer_id,media_file_operation,image_id,media_file_service)
##############################################
# Creating new assets #
##############################################
#Asset service
asset_service = client.get_service('AssetService', version='v2')
# Asset operation service
asset_operation = client.get_type('AssetOperation',
version='v2')
# Mutate Image asset - Create
asset_resource_name =
mutate_image_create(client,customer_id,asset_operation,media_file_resource_name,asset_service,image_id)
print('Uploading ....')
print('Image: %s\n'%(asset_resource_name))
################################################
# Image Assets Update
################################################
#Including new video in the list of videos to be assigned to
the ad group ad
images_list.append(asset_resource_name)
##############################################
# Ad . #
##############################################
# Update Ad
ad_operation = client.get_type('AdOperation', version='v2')
ad = ad_operation.update
ad.resource_name = ad_service.ad_path(customer_id, num_ad)
for asset in images_list:
print("Sending info to Google ads...")
image_asset = ad.app_ad.images.add()
image_asset.asset.value = asset
#==============================================
# Field Mask Update
#==============================================
fm = protobuf_helpers.field_mask(None, ad)
ad_operation.update_mask.CopyFrom(fm)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/15f40a48-ab2d-4f18-b374-b84eb9d388bc%40googlegroups.com.