Skip to content

Conversation

@daspecster
Copy link
Contributor

Fixes #2749.

@daspecster daspecster added the api: vision Issues related to the Cloud Vision API. label Nov 17, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 17, 2016

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

This comment was marked as spam.

Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

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.

@daspecster
Copy link
Contributor Author

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

@daspecster daspecster merged commit a10cf56 into googleapis:master Nov 17, 2016
@daspecster 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
Fix vision error when no results returned.
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>
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