Google云视API"cannot use connPool"

Google Cloud Vision API "cannot use connPool"

我正在学习 Google Cloud Vision API,但遇到了一些问题。我已经完全重复了 'Getting Started' 指南中的所有步骤。

  1. download/installgoogle云SDK
  2. 使用 gcloud 激活登录凭据
  3. 设置环境变量GOOGLE_APPLICATION_CREDENTIALS
  4. 安装客户端库

之后我 运行 this 编码并在编译时得到这个错误:

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

我一遍又一遍地重复所有步骤,但仍然出现此错误。 Windows 10 在我的电脑上安装了最新的软件更新。 我没有更改教程中的代码。

谁能告诉我为什么会出现此错误?

问题已解决。

我只需要删除冲突的自定义导入和 re-install Google 视觉库。

好吧,这是一个愚蠢的错误,很抱歉打扰你。