嘗試從GAE入門手冊運行helloworld應用程序,它給了我一個空白頁面。GAE入門教程未運行
我有一個文件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)
並在同一目錄文件app.yaml
:
application: hell2
version: 1
runtime: python
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: hell2.py
在谷歌網頁上的教程說腳本應該有.app擴展名,但拋出一個錯誤馬上。也使用python27作爲運行時無法找到python,這是python 2.7.3順便說一句。就像它運行但瀏覽器不顯示文本。 基於webapp的舊例子工作正常。我檢查並發現webapp2.py在SDK中。
在運行時標籤
如果您有答案,請將其標記爲已接受。 – 2013-09-16 05:18:31