将我的应用引擎开发环境升级到 1.7.6 后,应用无法启动。在本地运行时,我收到以下错误,该错误不在项目代码中。
回溯(最后一次调用):文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/_python_runtime.py”,第 194 行,在 _run_file(文件, globals()) 文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/_python_runtime.py”,第 190 行,在 _run_file execfile(script_path, globals_) 文件“/Applications /GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/runtime.py”,第 101 行,在 main() 文件“/Applications/GoogleAppEngineLauncher. app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/runtime.py”,第 78 行,在主 sandbox.enable_sandbox(config) 文件“/Applications/GoogleAppEngineLauncher .app/Contents/Resources/GoogleAppEngine-default。bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py”,第 164 行,在 enable_sandbox 中从 google.appengine.runtime 导入运行时文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine -default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/runtime.py”,第 39 行,从 google.appengine.runtime 导入 cgi 文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default .bundle/Contents/Resources/google_appengine/google/appengine/runtime/cgi.py",第 31 行,从电子邮件导入 feedparser ImportError: cannot import name feedparser运行时导入运行时文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/runtime.py”,第 39 行,来自 google.appengine.runtime 导入cgi 文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/cgi.py”,第 31 行,来自电子邮件导入 feedparser ImportError:无法导入名称提要解析器运行时导入运行时文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/runtime.py”,第 39 行,来自 google.appengine.runtime 导入cgi 文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/cgi.py”,第 31 行,来自电子邮件导入 feedparser ImportError:无法导入名称提要解析器app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/cgi.py”,第 31 行,从电子邮件导入 feedparser ImportError:无法导入名称 feedparserapp/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/cgi.py”,第 31 行,从电子邮件导入 feedparser ImportError:无法导入名称 feedparser
奇怪的是,其他四个应用程序将毫无错误地启动。我在这个失败的项目中找不到任何已更改或会导致此错误的内容。
还要注意...
- 应用程序在部署到 App Engine 时运行
- 当我将 SDK 降级到 1.7.5 时,应用程序再次开始运行
应用定义
application: myapp
version: 1
runtime: python27
api_version: 1
threadsafe: true
derived_file_type:
- python_precompiled
inbound_services:
handlers:
- url: /css
static_dir: public/css
- url: /img
static_dir: public/img
- url: /js
static_dir: public/js
- url: /favicon.ico
static_files: public/img/favicon.ico
upload: public/img/favicon.ico
- url: /_ah/mail/.+
script: email.email.app
- url: .*
script: main.app