使用Google Cloud Datastore访问Google App Engine数据

时间:2013-06-25 18:04:28

标签: google-app-engine google-compute-engine google-cloud-datastore

我正在尝试使用Google Cloud Datastore访问我的Google App Engine应用程序的数据。我按照here中标题为“适用于现有App Engine应用程序的Google Cloud Datastore”一节中的步骤进行操作。一旦我启动了GCE VM,我就尝试从我的应用程序中读取,但得到了堆栈跟踪:

Traceback (most recent call last):
  File "datastore_test.py", line 30, in <module>
    get()
  File "datastore_test.py", line 21, in get
    resp = datastore.lookup(req)
  File "/usr/local/lib/python2.7/dist-packages/googledatastore-v1beta1_rev1_1.0.0-py2.7.egg/googledatastore/__init__.py", line 66, in lookup
    return get_default_connection().lookup(request)
  File "/usr/local/lib/python2.7/dist-packages/googledatastore-v1beta1_rev1_1.0.0-py2.7.egg/googledatastore/connection.py", line 82, in lookup
    datastore_v1_pb2.LookupResponse)
  File "/usr/local/lib/python2.7/dist-packages/googledatastore-v1beta1_rev1_1.0.0-py2.7.egg/googledatastore/connection.py", line 207, in _call_method
    raise RPCError(method, response, content)
googledatastore.connection.RPCError: lookup RPC client failure with HTTP(403) Forbidden: Access Not Configured

如何配置对数据的访问?

1 个答案:

答案 0 :(得分:1)

正如proppy所提到的,我必须从https://cloud.google.com/console启用API。现在它按预期工作。