gpt4 book ai didi

python - 尝试从 docker 容器访问时,Datastore 返回 503

转载 作者:太空宇宙 更新时间:2023-11-03 16:55:54 25 4
gpt4 key购买 nike

我有一个运行 Ubuntu 15.10 和 docker 1.10.1 的 Google Compute Engine 实例。当我尝试从实例上的 gcloud-python 访问 Google Datastore 时,一切正常。当我尝试从基于 python:3.5 的 docker 容器内部访问它时,我总是收到 503 错误。这是完整的堆栈跟踪:

>>> unit = client.get(key)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/client.py", line 262, in get
deferred=deferred)
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/client.py", line 303, in get_multi
transaction_id=transaction and transaction.id,
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/client.py", line 136, in _extended_lookup
transaction_id=transaction_id,
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/connection.py", line 200, in lookup
_datastore_pb2.LookupResponse)
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/connection.py", line 118, in _rpc
data=request_pb.SerializeToString())
File "/usr/local/lib/python3.5/site-packages/gcloud/datastore/connection.py", line 95, in _request
raise make_exception(headers, content, use_json=False)
gcloud.exceptions.ServiceUnavailable: 503 Backend Error

谁能告诉我这里可能发生了什么?

最佳答案

对我来说,这个问题已通过启用“Google Cloud Datastore API (v1beta2)”得到解决。不要将其与“Google Cloud Datastore API”混淆。为此,您可以转到 API 管理器概述,搜索“数据存储”,选择“Google Cloud Datastore API (v1beta2)”,然后点击“启用”按钮。

关于python - 尝试从 docker 容器访问时,Datastore 返回 503,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35426200/

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