Naveen
Naveen

Reputation: 677

Google Video Intelligence API query

I am trying to implement VideoIntelligence API in my 'personal-project'. but I am not able to do so. [I have the access permissions for VideoIntelligence API for my personal-project]

Please provide some suggestions to make it work.

I tried the following commands:

(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)

But I am getting this as the Error:

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.)>)

It is searching inside 'usable-auth-library' project. Whereas It should search/use permission for my 'personal-project'. [since I have access for 'personal-project' and not 'usable-auth-library']

How can I make this work ? Any Suggestions please ?

Thanks

Upvotes: 0

Views: 691

Answers (2)

Matthias Baetens
Matthias Baetens

Reputation: 1553

I ran into a similar issue. For me it was related to the Service Account I was trying to use to authorise (setting the GOOGLE_APPLICATION_CREDENTIALS environment variable didn't do the trick for me), but

gcloud auth activate-service-account --key-file service-account-key-file

did (using the json you created following these steps).

Not sure why, because the environment variable should take precedence according to this.

Upvotes: 0

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117016

Google Video Intelligence is currently in private beta. This means that you will need to apply for beta access in order to use it.

There is a big blue button at the top of this page to apply Google Video Intelligence

When / If google grants you beta access you should receive an email congaing support and feedback information. This is normally a private group on Google groups.

After reading your comment I wonder wither or not you have been granted access yet. If your access hasn't gone though your not going to be able to make any requests.

Upvotes: 1

Related Questions