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:')
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'
As far as I know, I use only one feature with this code, so it should not be a problem.
FYI, I use the following code to "sign in" to the API and that part seems to work:
import argparse
from google.cloud import videointelligence
import os
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "MyCredit.json"Thanks for your help!
operation = video_client.annotate_video(
input_uri='gs://cloud-samples-data/video/cat.mp4', features=features)--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Cloud Video Intelligence API Discussion Google Group (cloud-videoi...@googlegroups.com) to participate in discussions with other members of the Google Cloud Video Intelligence API community and the Google Cloud Video Intelligence API Team.
---
You received this message because you are subscribed to the Google Groups "cloud-videointel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-videointel-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-videointel-discuss/375c15d5-e9f2-468d-bb2c-1d9ffe0116c2%40googlegroups.com.
| Lei Yang (杨蕾) | | Software Engineer, Play | | yanga...@google.com | | 650-214-4097 |
Hi Bence,Could you try the following? Thanks!operation = video_client.annotate_video(
input_uri='gs://cloud-samples-data/video/cat.mp4', features=features)
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-videointel-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-videointel-discuss/375c15d5-e9f2-468d-bb2c-1d9ffe0116c2%40googlegroups.com.