Hi Sreelakshmi,
I have exactly the same error on python.
In both cases me and Michael are using the example of a Media Bundle
provided by Google: 'https://goo.gl/9Y7qI2'
I have also tried creating my own simple HTML5 consisting only of an image
in Google Web Designer and got same error.
Mistake response:
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
/Users/peterokunev/PycharmProjects/goeuro/src/projects/display/gdn_creative_manager/scripts/t_html5.py
Response summary - {'requestId': 0005651ad02a66600a379b4379097203,
'responseTime': 297, 'serviceName': MediaService, 'methodName': upload,
'operations': 1, 'isFault': True, 'faultMessage':
'[MediaBundleError.INVALID_MEDIA_BUNDLE @ media[0].data]'}
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/googleads/util.py",
line 123, in PatchedHttpTransportSend
fp = self.u2open(u2request)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/transport/http.py",
line 132, in u2open
return url.open(u2request, timeout=tm)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 532, in open
response = meth(req, response)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 642, in http_response
'http', request, response, code, msg, hdrs)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 570, in error
return self._call_chain(*args)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 504, in _call_chain
result = func(*args)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/client.py",
line 613, in send
reply = self.options.transport.send(request)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/googleads/util.py",
line 134, in PatchedHttpTransportSend
raise suds.transport.TransportError(e.msg, e.code, e.fp)
suds.transport.TransportError: Internal Server Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/Users/peterokunev/PycharmProjects/goeuro/src/projects/display/gdn_creative_manager/scripts/t_html5.py",
line 64, in
main(adwords_client)
File
"/Users/peterokunev/PycharmProjects/goeuro/src/projects/display/gdn_creative_manager/scripts/t_html5.py",
line 43, in main
response = media_service.upload(media)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/googleads/common.py",
line 767, in MakeSoapRequest
self._packer) for arg in args])
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/client.py",
line 521, in __call__
return client.invoke(args, kwargs)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/client.py",
line 581, in invoke
result = self.send(soapenv)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/client.py",
line 619, in send
description=tostr(e), original_soapenv=original_soapenv)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/suds/client.py",
line 670, in process_reply
raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault: '[MediaBundleError.INVALID_MEDIA_BUNDLE
@ media[0].data]'
Process finished with exit code 1
"""This example uploads an HTML5 zip file.
"""
from src import base_dir, config_chain, key_paths
import base64
import urllib.request
from googleads import adwords
API_VERSION = config_chain["adwords"]["api_version"]
PATH_ADWORDS_CREDENTIALS = key_paths["adwords"]
MAIN_MCC_ID = config_chain["adwords"]["main_client_customer_id"]
TEST_ACCOUNT_ID = config_chain["adwords"]["test_account_id"]
def main(client):
# Initialize appropriate service.
media_service = client.GetService('MediaService', version=API_VERSION)
# Create HTML5 media.
base64_encoded_html5_zip = GetBase64EncodedHTML5ZipFromUrl(
'https://goo.gl/9Y7qI2')
# Create a media bundle containing the zip file with all the HTML5 components.
media = [{
'xsi_type': 'MediaBundle',
'data': base64_encoded_html5_zip,
'type': 'MEDIA_BUNDLE'
}]
# Upload HTML5 zip.
response = media_service.upload(media)
if response:
for media in response:
print(
'HTML5 media with ID %d, dimensions %dx%d, and MIME type "%s" '
'uploaded