FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Properly encode image content. by daspecster · Pull Request #2528 · googleapis/google-cloud-python · GitHub

Properly encode image content. - #2528

Merged
daspecster merged 1 commit into
googleapis:masterfrom
daspecster:vision-type-error-2525
Oct 12, 2016
Merged

Properly encode image content.#2528
daspecster merged 1 commit into
googleapis:masterfrom
daspecster:vision-type-error-2525

Conversation

Copy link
Copy Markdown
Contributor

Image content was not being properly encoded before being JSON serialized for the request.

Fixes #2525.

daspecster added the api: vision Issues related to the Cloud Vision API. label Oct 11, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 11, 2016
image_request = client.connection._requested[0]['data']['requests'][0]
# json_dump = json.dumps(image_request['image']['content'])
# self.assertEqual(json_dump, self.B64_IMAGE_CONTENT)

This comment was marked as spam.

This comment was marked as spam.

Comment thread vision/unit_tests/test_client.py Outdated
class TestClient(unittest.TestCase):
import base64
from google.cloud._helpers import _to_bytes
from google.cloud._helpers import _bytes_to_unicode

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor Author

@tseaver, I moved the imports and constants for the other test I updated for this.

LMKWYT

daspecster force-pushed the vision-type-error-2525 branch from e85c772 to 0e992eb Compare October 12, 2016 14:25
daspecster merged commit 09078c1 into googleapis:master Oct 12, 2016
daspecster deleted the vision-type-error-2525 branch October 12, 2016 14:40
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
chalmerlowe pushed a commit that referenced this pull request Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vision Issues related to the Cloud Vision API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL