0

I have a Pyramid app that I'm running on GAE. It works great most of the time but sometimes when I deploy (appcfg.py update ...) things just break. I start getting 500s when I try to access the app. Then if I make absolutely no changes to my code and deploy it again it works. I want the deploy to work every time.

Here's the traceback:

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

Has anyone experienced this? Is there a known fix?

Sheena
  • 15,590
  • 14
  • 75
  • 113
  • A couple of questions? have you installed webob with pyramid or are you using the supplied thirdparty webob. If you have installed it, have a look at the different paths your startup could take. Is this error in a warmup request or front facing request that is starting an instance. It's possible two different versions of the webob are conflicting. I find that pyramid requirements (cersion) of webob and the webob in appengine have been different, and that has caused me issues. – Tim Hoffman Aug 23 '16 at 09:45
  • 1
    The appengine bundled webob is "1.1.1" or "1.2.3" and the 1.1.1 branch doesn't even have SignedSerializer defined. – Tim Hoffman Aug 23 '16 at 09:48
  • Both 1.1.1 and 1.2.3 are ire inappropriate for the version of pyramid I am using. But I fixed it... Thanks @TimHoffman – Sheena Aug 23 '16 at 10:56

1 Answers1

0

The problem was that I was pushing webob 1.6.1 to appengine while deploying my app. At the same time I had this in my app.yaml:

libraries:
- name: webob
version: latest

What ended up working was just removing webob from app.yaml (I tried different versions supported by gae but no dice...)

Sheena
  • 15,590
  • 14
  • 75
  • 113