AppEngine 500 Server Error after deploy — error in

2019-07-27 19:27发布

I understand there are many posts already about this error, but my problem does seem unique, at least from my standpoint. Please prove me wrong! I am using Python 2.7, importing jinja2, and a db by way of from google.appengine.ext import db. My other simpler apps that don't import these packages deploy just fine, but this one throws an Error: Server Error. Could this have anything to do with my code, or is this a problem on Google's end? Seems this is a common error these days, but there also seem to be many diagnoses. However, as some of my apps deploy and not others, this is suspicious. Thanks.

--Some extra info--

As I said in my comments, the local run works fine and the deploy throws the server error.

**Log output after local run:

*** 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

**Log output after deploy:

*** 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-- Turns out I had a variable naming error, and when that was cleared up, no more 500 Server Error. I wish the errors thrown were a bit more explanatory, as they usually are besides this particular case. Lesson learned -- if you find yourself in this situation, it is certainly an error in your code. Thanks for your help everyone.

1条回答
仙女界的扛把子
2楼-- · 2019-07-27 19:43

App Engine 500 (Internal Server Error) almost always means that your Python code threw an unhanded exception that was caught by the runtime. When it catches one, it returns a 500 for the response.

查看更多
登录 后发表回答