Skip to content

Conversation

daspecster
Copy link
Contributor

Fixes #2930.

@daspecster daspecster added the api: vision Issues related to the Cloud Vision API. label Jan 24, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 24, 2017
:rtype: :class:`~google.cloud.vision.annotations.Annotations`
:returns: An instance of ``Annotations`` with detection types loaded.
"""
for feature_type in response.keys():

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Jan 25, 2017

@jonparrott @gguuss PTAL. (I can already image the bug reports: "where is my data")

@daspecster
Copy link
Contributor Author

daspecster commented Jan 25, 2017

@dhermes the data isn't going to get loaded unless it's routed into the google-cloud-python objects/DTO's. If it's not a property on the Annotations class then it won't be returned.

@lukesneeringer
Copy link
Contributor

I am all kinds of nervous about just dropping extra fields, but it looks like #2930 has already covered this ground. So, okay.

@daspecster
Copy link
Contributor Author

Bump!

@theacodes
Copy link
Contributor

This is fine with me. I believe this is what @gguuss had in mind - the data isn't there, but the library doesn't explode.

@daspecster
Copy link
Contributor Author

Thanks @jonparrott!

@daspecster daspecster merged commit f822e44 into googleapis:master Jan 30, 2017
@daspecster daspecster deleted the fix-key-error-for-unsupported-annotation branch January 30, 2017 22:20
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
* Fix KeyError for unsupported annotation types.
parthea pushed a commit that referenced this pull request Oct 21, 2023
* Fix KeyError for unsupported annotation types.
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.

6 participants