I’ve just come to Python from PHP after inheriting a legacy google app engine app. I’ve tried migrating to python 2.7 following various online tutorials, but I’m way out of my depth with the error below. Is it something to do with how I’m calling the GAE or Django api?
...
runtime: python27
api_version: 1
threadsafe: yes
builtins:
- remote_api: on
inbound_services:
- warmup
libraries:
- name: django
version: "1.2"
...
I still have
from google.appengine.ext.webapp.util import run_wsgi_app
In my code, should this be changed to a builin?
ERROR 2012-02-28 16:31:00,167 wsgi.py:205]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine- default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 193, in Handle
result = handler(self._environ, self._StartResponse)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/core/handlers/wsgi.py", line 248, in __call__
response = self.get_response(request)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_1_2/django/core/handlers/base.py", line 141, in get_response
return self.handle_uncaught_exception(request, resolver, sys.exc_info())
UnboundLocalError: local variable 'resolver' referenced before assignment
INFO 2012-02-28 16:31:00,178 dev_appserver.py:2884] "GET /ibi/index.html HTTP/1.1" 500 -
Don’t use
run_wsgi_appin Python 2.7 runtime. In yourapp.yamlyou have to refer to the actual WSGI application object.See documentation here on how to properly configure Django