googleads-python-lib
googleads-python-lib copied to clipboard
mistake on python example of create_custom_creative
@grivescorbett according to the api document, the type of assetByteArray attribute should be base64Binary, but the example set the content of image data directly, as below
`image_data = open(os.path.join(os.path.split(__file__)[0], '..', '..', 'data', medium_rectangle.jpg'), 'r').read()
... ...
'asset': {
'assetByteArray': image_data,
'fileName': 'image%s.jpg' % uuid.uuid4()
}
`
the correct one should be:
` 'asset': {
'assetByteArray': base64.b64encode(image_data),
'fileName': 'image%s.jpg' % uuid.uuid4()
}
`