Google App Engine启动器无法在Python Mac上运行我的世界 [英] Google App Engine Launcher is not running my hello world for Python Mac

查看:75
本文介绍了Google App Engine启动器无法在Python Mac上运行我的世界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了所有现有资源,但无济于事.

I have tried all the existing resources but to no avail.

这是我的app.yaml代码:

here is my app.yaml code:

version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: helloworld.app

这是我的webapp2代码:

Here is my webapp2 code:

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.write('Hello, World!')

app = webapp2.WSGIApplication([
    ('/', MainPage),
], debug=True)

全部在我的hello_world目录中.我继续添加现有应用程序,并指向helloworld.py(webapp2)脚本和app.yaml代码所在的hello_world目录.我在Google App Engine上运行,它一直保持加载状态,但从未完成.因此,我的http://localhost:8080/页面从不加载.

All in my hello_world directory. I proceed to add existing application and point to the hello_world directory where helloworld.py (webapp2) script and the app.yaml code are living. I hit run on Google App Engine and it just stays loading, it never completes. Therefore, my http://localhost:8080/ page never loads.

推荐答案

您在app.yaml中缺少application:行.

您可能还需要在库"部分中列出第三方webapp2,如下所示:

You're probably also gonna need to list the 3rd party webapp2 in the libraries section, something like this:

libraries:
- name: webapp2
  version: "2.5.2"

这篇关于Google App Engine启动器无法在Python Mac上运行我的世界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆