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

Fix vision error when no results returned. by daspecster · Pull Request #2750 · googleapis/google-cloud-python · GitHub

Fix vision error when no results returned. - #2750

Merged
daspecster merged 3 commits into
googleapis:masterfrom
daspecster:fix-vision-face-no-results
Nov 17, 2016
Merged

Fix vision error when no results returned.#2750
daspecster merged 3 commits into
googleapis:masterfrom
daspecster:fix-vision-face-no-results

Conversation

Copy link
Copy Markdown
Contributor

Fixes #2749.

daspecster added the api: vision Issues related to the Cloud Vision API. label Nov 17, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 17, 2016
Comment thread vision/google/cloud/vision/image.py Outdated

detected_objects = []
feature_key = _REVERSE_TYPES[feature_type]
annotations = results.get(feature_key, [])

This comment was marked as spam.

dhermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

self.assertEqual(5, image_request['features'][0]['maxResults'])

def test_face_detection_from_content_no_results(self):
RETURNED = {

This comment was marked as spam.

faces = image.detect_faces(limit=5)
self.assertEqual(faces, [])
self.assertEqual(len(faces), 0)
image_request = client._connection._requested[0]['data']['requests'][0]

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor Author

@dhermes, I'll merge this and follow up with some test improvements.

daspecster merged commit a10cf56 into googleapis:master Nov 17, 2016
daspecster deleted the fix-vision-face-no-results branch November 17, 2016 21:34
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…-results

Fix vision error when no results returned.
parthea pushed a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Oct 21, 2023
…#2750)](GoogleCloudPlatform/python-docs-samples#2750)

* automl: video beta - move beta samples out of branch and into master

* lint

* update error message on batch predict

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
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