1

我試圖使用Google Cloud Datastore訪問我的Google App Engine應用的數據。我遵循標題爲「Google雲數據存儲爲現有App Engine應用程序」的章節中的步驟here。一旦我得到了我GCE VM起來,我想從我的應用程序讀取,但得到的堆棧跟蹤:使用Google Cloud Datastore訪問Google App Engine數據

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

您能否確保您在http://cloud.google.com/console中啓用了Google Cloud Datastore API? – proppy

回答

1

作爲proppy提到,我必須從https://cloud.google.com/console啓用API。現在它按預期工作。

+0

請注意,您應該從http://cloud.google.com/console而不是code.google.com/apis/console啓用它 – proppy

相關問題