如何将我的app.yaml迁移到2.7? [英] How to migrate my app.yaml to 2.7?

查看:154
本文介绍了如何将我的app.yaml迁移到2.7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的gae应用程序迁移到python 2.7。这是我的新app.yaml:

I'm migrating my gae app to python 2.7. This is my new app.yaml:

application: webfaze
version: main
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /mapreduce(/.*)?
  script: mapreduce/main.application

- url: /(.*\.(html|css|js|gif|jpg|png|ico|swf))
  static_files: static/\1
  upload: static/.*
  expiration: "1d"

- url: .*
  script: main.application

- url: /task/.*
  script: main.application
  login: admin

但我收到以下错误消息:

But I get this error message:

Error parsing yaml file:
Invalid object:
threadsafe cannot be enabled with CGI handler: mapreduce/main.application
  in "webfaze/app.yaml", line 22, column 1

您可以告诉我如何解决错误吗?

Can you tell me how to resolve the error?

推荐答案

检查源代码,看起来你n ($。
$ b

Checking the source code, it looks that you need to define your handlers' path without any slash:

   if (handler.script and (handler.script.endswith('.py') or 
       '/' in handler.script)):
       raise appinfo_errors.ThreadsafeWithCgiHandler(
                    'threadsafe cannot be enabled with CGI handler: %s' %
                    handler.script)

application.py 移动到相应地修改处理程序的路径。

Move application.py to the root of your project and modify the handler's path accordingly.

这篇关于如何将我的app.yaml迁移到2.7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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