0

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

Naveen
  • 677
  • 1
  • 11
  • 27

2 Answers2

1

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.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • @DalmTo How can I verify if I have been granted the access yet ? [I signed up for the private Beta access 3 days ago. But not got any confirmation yet.] – Naveen Mar 13 '17 at 16:10
  • It can take a while they normally let you know if you get access – Linda Lawton - DaImTo Mar 13 '17 at 16:12
  • @DalmTo I made few changes in the Original question. Can you please help in resolving the issue ? [I now have access to VideoIntelligence API for my 'personal-project'] – Naveen Mar 18 '17 at 04:44
  • You should not change your original question it won't help others you should open a new question if I was correct and you didn't have access – Linda Lawton - DaImTo Mar 18 '17 at 06:13
  • My intention since starting was to make this API work. Initially, I didn't knew that I had no access to the API. Access to the API was just the intermediate part of the solution. – Naveen Mar 18 '17 at 06:29
  • I can create a new question but I don't know how to revert the original changes back for this question. – Naveen Mar 18 '17 at 06:30
0

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.

Matthias Baetens
  • 1,432
  • 11
  • 18