我知道已经有很多关于这个错误的帖子,但我的问题似乎很独特,至少从我的角度来看是这样。请证明我错了!我正在使用 Python 2.7,导入 jinja2,并通过from google.appengine.ext import db
. 我的其他不导入这些包的更简单的应用程序部署得很好,但是这个会抛出一个Error: Server Error
. 这可能与我的代码有关,还是 Google 的问题?似乎这是这些天常见的错误,但似乎也有很多诊断。但是,由于我的一些应用程序部署而不是其他应用程序,这是可疑的。谢谢。
--一些额外的信息--
正如我在评论中所说,本地运行正常,部署引发服务器错误。
**本地运行后的日志输出:
*** Running dev_appserver with the following flags: --admin_console_server= --port=8080
Python command: /usr/local/bin/python2.7
WARNING 2013-03-17 03:06:52,527 dev_appserver.py:3578] The datastore file stub is
deprecated, and will stop being the default in a future release.
Append the --use_sqlite flag to use the new SQLite stub.
You can port your existing data using the --port_sqlite_data flag or
purge your previous test data with --clear_datastore.
WARNING 2013-03-17 03:06:52,550 dev_appserver.py:3682] Could not initialize images API;
you are likely missing the Python "PIL" module. ImportError: No module named _imaging
INFO 2013-03-17 03:06:52,572 dev_appserver_multiprocess.py:656] Running application
dev~app1 on port 8080: http://localhost:8080
INFO 2013-03-17 03:06:52,572 dev_appserver_multiprocess.py:658] Admin console is
available at: http://localhost:8080/_ah/admin
**部署后的日志输出:
*** Running appcfg.py with the following flags:
--no_cookies --email=***@gmail.com --passin update
08:02 PM Host: appengine.google.com
08:02 PM Application: app1; version: 1
08:02 PM
Starting update of app: app1, version: 1
08:02 PM Getting current resource limits.
08:02 PM Scanning files on local disk.
08:02 PM Cloning 1 static file.
08:02 PM Cloning 4 application files.
08:02 PM Compilation starting.
08:02 PM Compilation completed.
08:02 PM Starting deployment.
08:02 PM Checking if deployment succeeded.
08:02 PM Deployment successful.
08:02 PM Checking if updated app version is serving.
08:02 PM Completed update of app: app1, version: 1
Password for ***@gmail.com: If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 0 ***
--UPDATE-- 原来我有一个变量命名错误,当它被清除后,不再出现 500 服务器错误。我希望抛出的错误更能说明问题,因为它们通常不包括这种特殊情况。经验教训 - 如果您发现自己处于这种情况,那肯定是您的代码中的错误。谢谢大家的帮助。