应用程序引擎Python:AttributeError:';模块';对象没有属性';股票';
我只是在生产中遇到了这个错误。在localhost上,它工作得很好应用程序引擎Python:AttributeError:';模块';对象没有属性';股票';,python,google-app-engine,memcached,Python,Google App Engine,Memcached,我只是在生产中遇到了这个错误。在localhost上,它工作得很好 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~ordenaaco
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上的数据吗
有什么想法吗?最有可能的是,memcache中有一个与新代码不匹配的对象的pickle版本。这里有一个关于刷新memcache的老问题,答案应该适用于您的案例:
从1.6.4版开始,管理控制台中有一个Memcache查看器。它包括一个“刷新缓存”按钮,该按钮应该完全满足您的需要。请包含产生此错误的实际代码的相关片段。非常感谢。