Skip to content
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(videointelligence): revert #9440; make features a keyword parameter #9810

Merged

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Nov 14, 2019

Creating this for a rollback.

Python sample code code was passing the keyword argument input_uri positionally before this change. Adding a required parameter changed the parameter order and broke existing code.

from google.cloud import videointelligence

video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.LABEL_DETECTION]
operation = video_client.annotate_video(
    'gs://cloud-samples-data/video/cat.mp4', features=features)
print('\nProcessing video for label annotations:')

But I have a problem with the video annotation function, I get the following error message:
TypeError                                 Traceback (most recent call last)
<ipython-input-24-5eb4216acaf7> in <module>
      4 features = [videointelligence.enums.Feature.LABEL_DETECTION]
      5 operation = video_client.annotate_video(
----> 6     'gs://cloud-samples-data/video/cat.mp4', features=features)
      7 print('\nProcessing video for label annotations:')

TypeError: annotate_video() got multiple values for argument 'features'

Note: We're still debating what to do about this longer term. I may add a synth replace to make this semi-permanent until the transition to the microgenerator. Alternatively we may take this change but do a major version bump to indicate that it is breaking.

…r in `annotate_video`, update retry config, make AnnotateVideo nonidempotent (via synth) (googleapis#9440)"

This reverts commit 9fd07ec.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 14, 2019
@busunkim96 busunkim96 changed the title Revert "fix(videointelligence): make features a positional paramete… fix(videointelligence): revert make features a positional parameter Nov 14, 2019
@busunkim96 busunkim96 changed the title fix(videointelligence): revert make features a positional parameter fix(videointelligence): make features a keyword parameter Nov 14, 2019
@busunkim96 busunkim96 changed the title fix(videointelligence): make features a keyword parameter fix(videointelligence): revert #9440; make features a keyword parameter Nov 14, 2019
@busunkim96 busunkim96 merged commit dd8fdd7 into googleapis:master Nov 15, 2019
@busunkim96 busunkim96 deleted the undo-videointelligence-positional-arg branch November 15, 2019 00:11
parthea pushed a commit that referenced this pull request Sep 22, 2023
…eter (#9810)

* Makes `features` a keyword parameter to annotate_video

This reverts part of commit 853d6125082589fe3bf8a3f5b347507de73589da.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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