gae间歇性导入错误(SignedSerializer)

时间:2016-08-22 09:34:18

标签: python google-app-engine importerror intermittent

我有一个我在GAE上运行的金字塔应用程序。它大部分时间都很好用,但有时当我部署(appcfg.py update ...)时,事情就会中断。当我尝试访问应用程序时,我开始获得500秒。然后,如果我绝对不对我的代码进行任何更改并再次部署它就可以了。我希望每次都能使用部署。

这里是追溯:

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/base/data/home/apps/s~projectwaxed/1.395098752063981059/waxed_backend/__init__.py", line 11, in <module>
    from pyramid.config import Configurator
  File "libs/pyramid/config/__init__.py", line 73, in <module>
    from pyramid.config.routes import RoutesConfiguratorMixin
  File "libs/pyramid/config/routes.py", line 21, in <module>
    import pyramid.config.predicates
  File "libs/pyramid/config/predicates.py", line 15, in <module>
    from pyramid.session import check_csrf_token
  File "libs/pyramid/session.py", line 11, in <module>
    from webob.cookies import SignedSerializer
ImportError: cannot import name SignedSerializer

有没有人经历过这个?有没有已知的修复方法?

1 个答案:

答案 0 :(得分:0)

问题是我在部署我的应用程序时正在推动webob 1.6.1进行appengine。同时我在app.yaml中有这个:

libraries:
- name: webob
version: latest

最终工作的只是从app.yaml中移除webob(我尝试了gae支持的不同版本,但没有骰子......)