我剛剛在生產中出現此錯誤。在本地主機上它運行良好。App Engine Python:AttributeError:'模塊'對象沒有屬性'股票'
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
handler.get(*groups)
File "/base/data/home/apps/s~ordenaacoes/2.357768699674437719/controllers/mainh.py", line 74, in get
'stocks': goodStocks(),
File "/base/data/home/apps/s~ordenaacoes/2.357768699674437719/controllers/mainh.py", line 108, in goodStocks
goodStocks = memcache.get("goodStocks")
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/memcache/__init__.py", line 574, in get
results = rpc.get_result()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/memcache/__init__.py", line 639, in __get_hook
self._do_unpickle)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/memcache/__init__.py", line 271, in _decode_value
return do_unpickle(value)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/memcache/__init__.py", line 412, in _do_unpickle
return unpickler.load()
File "/base/python_runtime/python_dist/lib/python2.5/pickle.py", line 852, in load
dispatch[key](self)
File "/base/python_runtime/python_dist/lib/python2.5/pickle.py", line 1084, in load_global
klass = self.find_class(module, name)
File "/base/python_runtime/python_dist/lib/python2.5/pickle.py", line 1119, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'Stock'
股票是我的模型之一。我也在本地主機上測試了python 2.5。
給出錯誤的行是對memcache(get函數)的訪問。
我已經改變了項目,也許我在memcache中放入的數據類型是不同的。我有辦法清除memcache上的數據嗎?
有什麼想法?
請包含產生此錯誤的實際代碼的相關片段。謝謝。 – bernie 2012-03-27 20:05:59