FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(videointelligence): revert #9440; make `features` a keyword parameter by busunkim96 · Pull Request #9810 · googleapis/google-cloud-python · GitHub

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 commented Nov 14, 2019
edited
Loading

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.
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 14, 2019
busunkim96 changed the title Revert "fix(videointelligence): make features a positional paramete… fix(videointelligence): revert make features a positional parameter Nov 14, 2019
busunkim96 changed the title fix(videointelligence): revert make features a positional parameter fix(videointelligence): make features a keyword parameter Nov 14, 2019
busunkim96 requested a review from dizcology November 14, 2019 23:37
busunkim96 changed the title fix(videointelligence): make features a keyword parameter fix(videointelligence): revert #9440; make features a keyword parameter Nov 14, 2019
busunkim96 merged commit dd8fdd7 into googleapis:master Nov 15, 2019
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL