newbie here--I've been trying to create a "Hello World" in bottle using google app engine. I got the "hello world" part to show up, but even on on index page, I get the following output: "Hello world!Status: 500"
If I try to add new routes (like the '/page' route), and I navigate to the new route, I get "Server error: The website encountered an error while retrieving... It may be down for maintenance or configured incorrectly." After I navigate to the improperly configured page, if I try to go back to '/', I will also receive a server error. I have placed bottle.py in my root directory. Could someone please help me to configure my file properly? Thanks!
import bottle
from bottle import route, template, request, error, debug
@route('/')
def index():
return "Hello World!"
@route('/page')
def page():
return 'page!'
bottle.debug(True)
bottle.run(server='gae')
Here's a good tutorial for bottle on GAE: http://blog.rutwick.com/use-bottle-python-framework-with-google-app-engine
DISCLAIMER: I did not run the tutorial, but it looks correct.
main.py:
app.yaml:
As you see there, are a number of differences from your sample code. The tutorial does a good job of explaining them, so I won't go into detail here.
This might help:
app.yaml:
main.py:
Here's the original answer from GitHub. https://github.com/defnull/bottle/issues/401
When using WSGI like in the App Engine + Bottle started code, you can call
bottle.debug()
when your code is running on the dev server:And in
app.yaml
: