Google翻译api身份验证错误Python

时间:2019-11-24 15:57:40

标签: python google-api-python-client google-translation-api

尝试使用Google Cloud API Translate时遇到问题。我无法理解认证。我已经用所有键下载了.json文件,并将其放置在与程序相同的文件夹中。我仍然收到错误消息:

  

google.auth.exceptions.DefaultCredentialsError:无法自动确定凭据。请设置GOOGLE_APPLICATION_CREDENTIALS或明确创建凭据,然后重新运行该应用程序。有关更多信息,请参见https://cloud.google.com/docs/authentication/getting-started

我只想使用词汇表和翻译功能。

0 个答案:

没有答案