Google App Engine Python:部署时yaml配置文件中出现错误

Mar*_*osB 5 python google-app-engine python-3.x google-cloud-platform

我正在使用Google App Engine和Python37环境。今天尝试部署微服务时收到错误消息:
我运行以下命令:

gcloud app deploy app.yaml
Run Code Online (Sandbox Code Playgroud)

得到了错误:

...
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: script field for handler '/.*' 
must be set to 'auto' for runtime python37.
PS C:\path_to_app> gcloud app deploy app.yaml
...
Run Code Online (Sandbox Code Playgroud)

我的app.yaml是:

service: service_name
runtime: python37

handlers:
- url: /.*
script: main.py
Run Code Online (Sandbox Code Playgroud)

它与我最近部署的其他微服务看起来完全一样,只是服务名称不同。
我试图重新部署已经运行的服务,并收到相同的错误消息。
因此,我仔细检查了app.yaml参考文档:https : //cloud.google.com/appengine/docs/standard/python3/config/appref
但我无法找出问题所在,为什么同样的yaml文件也能正常工作之前不再工作了。

有谁知道最近几天在Google App Engine上可能出什么问题或可以更改什么?

提前致谢。

小智 9

根据适用于Python 3.7 的AppEngine文档

脚本元素唯一接受的值是auto

以下是文档中的示例条目:

handlers:
- url: /images
  static_dir: static/images

- url: /.*
  secure: always
  redirect_http_response_code: 301
  script: auto
Run Code Online (Sandbox Code Playgroud)