-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix KeyError for unsupported annotation types. #2961
Fix KeyError for unsupported annotation types. #2961
Conversation
@@ -87,6 +87,9 @@ def from_api_repr(cls, response): | |||
: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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@jonparrott @gguuss PTAL. (I can already image the bug reports: "where is my data") |
@dhermes the data isn't going to get loaded unless it's routed into the |
I am all kinds of nervous about just dropping extra fields, but it looks like #2930 has already covered this ground. So, okay. |
Bump! |
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. |
Thanks @jonparrott! |
* Fix KeyError for unsupported annotation types.
* Fix KeyError for unsupported annotation types.
Fixes #2930.