错误:(gcloud.app.deploy)无法识别为有效的源目录或文件

kya*_*nda 5 google-app-engine python-3.x google-cloud-platform

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

myapp.yaml与 where 位于同一目录中manage.py。我也不是从本地磁盘 C 工作,而是从本地磁盘 G 工作并使用 Visual Studio Code 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.
Run Code Online (Sandbox Code Playgroud)

小智 3

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

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