gpt4 book ai didi

python - 在 python 中从现有的谷歌计算引擎连接谷歌数据存储

转载 作者:太空宇宙 更新时间:2023-11-04 06:06:13 24 4
gpt4 key购买 nike

我正在尝试从现有的计算引擎实例连接到 Datastore,我得到:

[ python 2.7 - googledatastore-v1beta2_rev1_2.1.0-py2.7 ]

googledatastore.connection.RPCError: commit RPC client failure with HTTP(403) Forbidden: Unauthorized.

Datastore API 已启用,权限已设置但 GCE 位于不同区域,一个项目

还有什么?

GCE 环境:

DATASTORE_DATASET = project_id
DATASTORE_PRIVATE_KEY_FILE = absolute path to pem file
DATASTORE_SERVICE_ACCOUNT = service_account_email

任何提示我应该做什么/检查?我很困惑,因为我在本地环境中具有完全相同的配置 - 当我在 pyCharm 中单击“播放”时,一切正常;)

也许我错过了什么......

感谢您的帮助;)

最佳答案

目前这是一个 bug in the Cloud Datastore client library .如果您在 GCE 上运行,它将尝试使用 scope rules然后在尝试其他身份验证方法之前失败。

关于python - 在 python 中从现有的谷歌计算引擎连接谷歌数据存储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21901610/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com