【问题标题】:GAE tutorial - browsing 'Localhost:8080' gives me server error?GAE 教程 - 浏览 'Localhost:8080' 给我服务器错误?
【发布时间】:2013-09-11 03:51:11
【问题描述】:

我正在使用 Google App Engine GUI。不知道我做错了什么,因为我正在追随 Google 在这方面的领导。在 GUI 中,应用程序在管理端口 8000 上运行并在端口 8080 上侦听。当我转到 localhost:8080 时,Chrome 中出现“服务器错误”。这是防火墙问题还是 GAE 问题?

helloudacity.py

 import webapp2

 class mainPage(webapp2.RequestHandler):

      def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.write('Hello, Udacity!')


application = webapp2.WSGIApplication([
('/', MainPage),
], debug=true)

app.yaml

application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
 - url: /.*
   script: helloudacity.application

【问题讨论】:

    标签: google-app-engine


    【解决方案1】:

    您忘记在路由中将 mainPage 大写,并将 debug=true 设置为 True。如果您查看错误控制台,大多数错误应该都存在。

    【讨论】:

      【解决方案2】:

      尝试将debug=true 更改为debug=True

      Python 上的布尔值是 TrueFalse

      Google´s sample 是对的。

      【讨论】:

        猜你喜欢
        • 2016-09-02
        • 2023-02-20
        • 2015-08-27
        • 1970-01-01
        • 2020-06-18
        • 2012-10-08
        • 2014-06-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多