Search code examples
gogoogle-cloud-vision

Google Cloud Vision API "cannot use connPool"


I'm learning Google Cloud Vision API, but facing some issues. I have completely repeated all the steps from the 'Getting Started' Guide.

  1. download/install google cloud SDK
  2. activate login credentials using gcloud
  3. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS
  4. Install the client library

After that I ran this code and got this error when compiling:

..\cloud.google.com\go\longrunning\autogen\operations_client.go:166:54: cannot use connPool (type "google.golang.org/api/internal".ConnPool) as type *"google.golang.org/grpc".ClientConn in argument to longrunning.NewOperationsClient

Compilation finished with exit code 2

I repeated all the steps over and over and still get this error. Windows 10 is installed on my pc with the latest software updates. I have NOT changed the code from the tutorial.

Can anyone please tell me why I'm getting this error?


Solution

  • Issue has been fixed.

    I just needed to remove conflicting custom imports and re-install Google Vision library.

    Well that was a dumb mistake, sorry to bother you.