Google Vision API - tatusCode.RESOURCE_EXHAUSTED

I am new to Google Vision API and I would like to conduct shortcut detection app. 10 images and I would like to run the quickstart.py file for the vision. However, when I do this with only 3 images, it succeeds. With more than 3 images, I am getting the error below. I know that I need to change something in my setup, but I don't know what I should change.

Here is my error message:

google.gax.errors.RetryError: GaxError(Exception occurred in retry method 
that was not classified as transient, caused by <_Rendezvous of RPC that 
terminated with (StatusCode.RESOURCE_EXHAUSTED, Insufficient tokens for 
quota 'DefaultGroup' and limit 'USER-100s' of service 
'vision.googleapis.com' for consumer 'project_number: XXX'.)>)

      

Does anyone know what I need to do?

Any help would be much appreciated

Cheers, Andi

+3


source to share


1 answer


I faced the same problem and fixed it with the following steps:



Good luck ...

Edit: in addition to the above steps 1.-3. you can just do vision_client = vision.Client.from_service_account_json('/path/to/your/keyfile.json')

in script. Then there is no need for an env variable.

+3


source







All Articles