googleads / googleads/googleads-python-lib

mistake on python example of create_custom_creative

Open
#371 0 comments 0 reactions 1 assignee View on GitHub

@christopherseeley is already working on this.

Since Mar 14, 2019.

Dominant language
Python
Stars
749
Forks
967
PR merge metrics
No merged PRs in 30d

Description

@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()
                   }
     `

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.