2012-02-28 9 views
1

私はちょうど従来のGoogleアプリケーションエンジンアプリケーションを継承した後、PHPからPythonに来ました。私はさまざまなオンラインチュートリアルの後にPython 2.7に移行しようとしましたが、私は以下のエラーで私の奥行きから脱出しています。私はGAEやDjango APIをどのように呼んでいるのかとは何か?これはbuilinに変更する必要がありますGAEアプリケーションをPython 2.7に移行した後のwsgi.pyエラー

... 
runtime: python27 
api_version: 1 
threadsafe: yes 

builtins: 
- remote_api: on 

inbound_services: 
- warmup 


libraries: 
- name: django 
    version: "1.2" 
... 

私はまだ、私のコードでは

from google.appengine.ext.webapp.util import run_wsgi_app 

がありますか?

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 - 

答えて

2

Python 2.7ランタイムでrun_wsgi_appを使用しないでください。 app.yamlでは、実際のWSGIアプリケーションオブジェクトを参照する必要があります。

が正しくジャンゴ

+0

感謝を設定する方法のdocumentation hereを参照してください、私が見逃していたというドキュメントインチ私は明日行くつもりです。 – Grib

関連する問題