I tried to make a MediaFile using MediaFileService but failing repeatedly.
media_file_service = client.get_service('MediaFileService', version='v1')
# create media file
media_file_operation = client.get_type('MediaFileOperation', version='v1')
media_file = media_file_operation.create
media_file.name.value = 'Bugs bunny'
media_file.source_url.value = 'http://cdn.zzz.com'
media_file.type = client.get_type('MediaTypeEnum', version='v1').DYNAMIC_IMAGE
media_file.mime_type = client.get_type('MimeTypeEnum', version='v1').IMAGE_GIF
with open('candy_1.gif', 'rb') as fp:
data = fp.read()
media_file.image.data.value = bytes(data)
try:
media_file_response = media_file_service.mutate_media_files(
customer_id, [media_file_operation])
except GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('\tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('\t\tOn field: %s' % field_path_element.field_name)
sys.exit(1)
Above is the code that I implemented. I did this as mentioned in the documentation. But not sure why this error has occurred.
Request with ID "masked" failed with status "INVALID_ARGUMENT" and includes the following errors:
Error with message "A required field was not specified or is an empty string.".
On field: operations
Above is the error response I got.
Thanks.
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/1ea73c2e-5392-4b80-9dd5-e2550597b1f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,From my investigation so far, it appears that the Google Ads API currently only supports uploads for ICON and IMAGE, not DYNAMIC_IMAGE. However, I'm confirming this with the team and will get back to you with an update.Thanks,Josh, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ffd25930-85e4-469a-8dcc-7a3ccf3a9a0f%40googlegroups.com.