2
1 from google.appengine.ext import webapp
2 from google.appengine.ext.webapp.util import run_wsgi_app
3 from google.appengine.ext import db
4
5 a = db.GqlQuery('SELECT * FROM Store WHERE count = True').count
6
7 print 'Content-Type: text/plain'
8 print ''
9 print str(a)+'blah blah'
表'存儲'存在。這爲什麼會失敗? (谷歌appengine數據存儲,蟒蛇)
的錯誤是:
Traceback (most recent call last):
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 3245, in _HandleRequest
self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 3186, in _Dispatch
base_env_dict=env_dict)
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 531, in Dispatch
base_env_dict=base_env_dict)
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 2410, in Dispatch
self._module_dict)
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 2320, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "/opt/google-appengine/google/appengine/tools/dev_appserver.py", line 2216, in ExecuteOrImportScript
exec module_code in script_module.__dict__
File "/home/jck/bitsconv/bitsconv.py", line 5, in <module>
a = db.GqlQuery('SELECT * FROM Store WHERE count = True').count()
File "/opt/google-appengine/google/appengine/ext/db/__init__.py", line 2298, in __init__
model_class = class_for_kind(self._proto_query._entity)
File "/opt/google-appengine/google/appengine/ext/db/__init__.py", line 266, in class_for_kind
raise KindError('No implementation for kind \'%s\'' % kind)
KindError: No implementation for kind 'Store'
謝謝,工作! – jck 2011-03-19 23:18:09
@jck:具體地說,「表存儲存在」不是真的;沒有表格,只是實體。 – geoffspear 2011-03-20 03:58:14