当我浏览 Google Cloud 教程时:https://cloud.google.com/python/getting-started/using-pub-sub#running_the_app_on_your_local_machine
我收到以下错误:
google.auth._default 无法从 Cloud SDK 配置中确定项目 ID。考虑运行gcloud config set project或设置 GOOGLE_CLOUD_PROJECT 环境变量
我执行了“gcloud config set project [我的项目名称]”但没有成功。
有什么问题?
更新:我之前已经部署了应用程序引擎,没有任何问题。仅当我为此 Pub/Sub 功能运行 psqworker 时,才会出现此问题。我知道我的项目 ID 并且之前使用过它。