【发布时间】:2017-03-13 10:46:28
【问题描述】:
我正在尝试在我的“个人项目”中实现 VideoIntelligence API。但我不能这样做。 [我的个人项目拥有 VideoIntelligence API 的访问权限]
请提供一些建议以使其发挥作用。
我尝试了以下命令:
(venv) naveen@naveen:~/Desktop/personal-project$ python manage.py shell
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from google.cloud.gapic.videointelligence.v1beta1 import video_intelligence_service_client
>>> video_client = video_intelligence_service_client.VideoIntelligenceServiceClient()
>>> path = 'gs://demomaker/google_gmail.mp4'
>>> features = [2]
>>> operation = video_client.annotate_video(path, features)
但我认为这是错误:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "personal-project/venv/local/lib/python2.7/site-packages/google/cloud/gapic/videointelligence/v1beta1/video_intelligence_service_client.py", line 234, in annotate_video
self._annotate_video(request, options), self.operations_client,
File "personal-project/venv/local/lib/python2.7/site-packages/google/gax/api_callable.py", line 419, in inner
return api_caller(api_call, this_settings, request)
File "personal-project/venv/local/lib/python2.7/site-packages/google/gax/api_callable.py", line 407, in base_caller
return api_call(*args)
File "personal-project/venv/local/lib/python2.7/site-packages/google/gax/api_callable.py", line 368, in inner
return a_func(*args, **kwargs)
File "personal-project/venv/local/lib/python2.7/site-packages/google/gax/retry.py", line 126, in inner
' classified as transient', exception)
RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.PERMISSION_DENIED, Google Cloud Video Intelligence API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/videointelligence.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.)>)
它正在“usable-auth-library”项目中搜索。而它应该搜索/使用我的“个人项目”的权限。 [因为我可以访问 'personal-project' 而不是 'usable-auth-library']
我怎样才能做到这一点?有什么建议吗?
谢谢
【问题讨论】:
-
考虑到您已获得访问私人测试版程序的权限,我假设 Google 已将您添加到一个群组以寻求帮助。我认为你应该检查一下。
-
@DaImTo 我该如何检查?
-
@DaImTo 有什么建议可以完成这项工作吗?
标签: python google-api google-api-client google-api-python-client video-intelligence-api