Skip to content Skip to sidebar Skip to footer

Google Vision API Text Detection Python Example Uses Project: "google.com:cloudsdktool" And Not My Own Project

I am working on the python example for Cloud Vision API from github repo. I have already setup the project and activated the service account with its key. I have also called the gc

Solution 1:

Download the credentials you created and update the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to that file:

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials-key.json

Reference: https://github.com/GoogleCloudPlatform/cloud-vision/tree/master/python/text#set-up-to-authenticate-with-your-projects-credentials


Solution 2:

The export didn't work for me, even setting it in the code:

import os
...
os.environ['GOOGLE APPLICATION_CREDENTIALS'] = 'path to servvice account json'
os.environ['GCLOUD_PROJECT'] = 'project id'
...

But this fix worked: Google cloud speech api throwing 403 when trying to use it


Post a Comment for "Google Vision API Text Detection Python Example Uses Project: "google.com:cloudsdktool" And Not My Own Project"