Reputation: 608
Trying to run the helloworld app from the Getting Started on GAE and it gives me a blank page.
I have the file hell2/hell2.py
:
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, webapp2 World!')
app = webapp2.WSGIApplication([('/', MainPage)],
debug=True)
and the file app.yaml
in same dir:
application: hell2
version: 1
runtime: python
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: hell2.py
the tutorial on the google page says script should have .app extension but that throws an error right away. also using python27 as the runtime cannot find python, which is python 2.7.3 btw. as is it runs but the browser does not show the text. the older example based on webapp works fine. I checked and found webapp2.py is in the SDK.
Upvotes: 0
Views: 88
Reputation: 35788
.app
is not the extension -- rather, it is a variable in the Python module hell2
. So, change the line in app.yaml to this:
script: hell2.app
Upvotes: 0
Reputation: 184
in the runtime tag goes python27 instead python
you need change
handlers:
- url: /.*
script: hell2.app
Upvotes: 3