There are some issues in Google docs for configuring GAE with Python 2.7. If you try to run the basic hello world application through the App Engine GUI, following the instructions, are you likely to see red text and all buttons in gray?
If this is so, it is due to the fact that there are errors in your helloworld.py program - Google instructions could not be followed here.
The import statement that they have in the instructions:
import webapp2
This fails, it must point to a local GAE webapp instance. In addition, their Python 2.7 program is incomplete. If you look at the Python 2.5 example, you will see the full program (you may need to change webapp -> webapp2 for Python 2.7?):
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, webapp World!') application = webapp.WSGIApplication( [('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main()
Last thing, the YAML file in Google instructions refers to "helloworld.app" - I canโt confirm this, but I think it should be "helloworld.py" ?? I donโt know, I could be wrong.
A couple of months have passed since you posted the question, if you find any details, feel free to update this question.
brandtrock
source share