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 <suds.sax.document.Document object at 0x1075fddd8> 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 <module> 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 successfully.' % (media['mediaId'], media['dimensions'][0]['value']['width'], media['dimensions'][0]['value']['height'], media['mimeType'])) def GetBase64EncodedHTML5ZipFromUrl(url): """Retrieve zip file from the given URL.""" response = urllib.request.urlopen(url) # Note: The utf-8 decode is for 2to3 Python 3 compatibility. return base64.b64encode(response.read()).decode('utf-8') if __name__ == '__main__': # Initialize client object. adwords_client = adwords.AdWordsClient.LoadFromStorage(path=PATH_ADWORDS_CREDENTIALS) main(adwords_client) Thank you, On Monday, 8 January 2018 20:27:10 UTC+1, Sreelakshmi Sasidharan (AdWords API Team) wrote: > > Hi Michael, > > It looks like the media bundle that you are trying to upload has some > issues. Could you please follow this > <https://support.google.com/adwords/answer/6335679?authuser=0&hl=en> guide > to validate your media bundle? Once you are able to fix the issues with > that, the API call should work fine. > > Thanks, > Sreelakshmi, AdWords API Team > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@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/abc0c67a-7cae-4736-8c44-265e319adbbb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.