Skip to content

fix(videointelligence): revert #9440; make features a keyword parameter - #9810

Merged
busunkim96 merged 2 commits into
googleapis:masterfrom
busunkim96:undo-videointelligence-positional-arg
Nov 15, 2019
Merged

fix(videointelligence): revert #9440; make features a keyword parameter#9810
busunkim96 merged 2 commits into
googleapis:masterfrom
busunkim96:undo-videointelligence-positional-arg

Conversation

@busunkim96

@busunkim96busunkim96 commented Nov 14, 2019

Copy link
Copy Markdown
Contributor

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.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 14, 2019
@busunkim96busunkim96 changed the title Revert "fix(videointelligence): make features a positional paramete…fix(videointelligence): revert make features a positional parameterNov 14, 2019
@busunkim96busunkim96 changed the title fix(videointelligence): revert make features a positional parameterfix(videointelligence): make features a keyword parameterNov 14, 2019
@busunkim96busunkim96 changed the title fix(videointelligence): make features a keyword parameterfix(videointelligence): revert #9440; make features a keyword parameterNov 14, 2019
@busunkim96
busunkim96 merged commit dd8fdd7 into googleapis:masterNov 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@busunkim96@crwilcox@dizcology@googlebot