GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(videointelligence): revert #9440; make `features` a keyword parameter by busunkim96 · Pull Request #9810 · googleapis/google-cloud-python

Conversation

@busunkim96

@busunkim96 busunkim96 commented Nov 14, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@busunkim96
Revert "fix(videointelligence): make features a positional paramete…
28c88d2
…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
fix: don't revert changes to client config
5774744
@busunkim96
busunkim96 requested a review from dizcology November 14, 2019 23:37
@busunkim96 busunkim96 changed the title fix(videointelligence): make features a keyword parameter fix(videointelligence): revert #9440; make features a keyword parameter Nov 14, 2019
dizcology
dizcology approved these changes Nov 14, 2019
View reviewed changes
crwilcox
crwilcox approved these changes Nov 15, 2019
View reviewed changes
@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
This was referenced Jan 29, 2020
chore(bigquery): bump copyright year to 2020, tweak docstring formatting (via synth) #10225
Merged
[CHANGE ME] Re-generated container to pick up changes in the API or client library generator. #10256
Closed
[CHANGE ME] Re-generated datastore to pick up changes in the API or client library generator. #10261
Closed
parthea pushed a commit that referenced this pull request Sep 22, 2023
@busunkim96
fix(videointelligence): revert #9440; make features a keyword param…
24affd2
…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

Reviewers

2 more reviewers
@crwilcox crwilcox crwilcox approved these changes
@dizcology dizcology dizcology approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@busunkim96 @crwilcox @dizcology @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.