首页 > 解决方案 > 错误:(gcloud.app.deploy)无法识别为有效的源目录或文件

问题描述

每次运行gcloud app deploy命令时都会出现此错误。

Myapp.yaml与 where is 在同一目录中manage.py。我也不是在本地磁盘 C 上工作,而是在本地磁盘 G 上工作并使用 Visual Studio 代码 cmd 终端。

ERROR: An app.yaml (or appengine-web.xml) file is required to deploy this directory as an App Engine application. Create an app.yaml file using the directions at https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml (App Engine Flexible Environment) or https://cloud.google.com/appengine/docs/standard/python/config/appref (App Engine Standard Environment) under the tab for your language.

ERROR: (gcloud.app.deploy) [G:\] could not be identified as a valid source directory or file.

标签: python-3.xgoogle-app-enginegoogle-cloud-platform

解决方案


据我了解,您正在 G: 本地磁盘的主文件夹中运行“gcloud app deploy”命令。

为了部署应用程序,您的路径应该是 app.yaml 文件所在的路径,或者在运行“gcloud app deploy”时将路径指定为参数,如第一个示例中所示


推荐阅读