python-3.x - 错误:(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.
解决方案
据我了解,您正在 G: 本地磁盘的主文件夹中运行“gcloud app deploy”命令。
为了部署应用程序,您的路径应该是 app.yaml 文件所在的路径,或者在运行“gcloud app deploy”时将路径指定为参数,如第一个示例中所示。
推荐阅读
- python - 解析包含 JSON 列表的文本文件
- r - 在 dplyr 中使用特定组合过滤
- php - 将数据库结果表转换为聚合相似值的有意义的输出
- java - 尝试查找客户时,在“类 [rewards_grails.Customer] 上的方法已在 Grails 应用程序之外使用”中出现错误
- vue.js - 像 Angular 一样在 Vue 中创建服务
- java - Mockito thenReturn() 返回空值
- reactjs - 当运行 this._login `this.navigation` 是 `undefined`
- javascript - preventDefault() 无法处理表单请求
- java - 在另一个 Runnable 实现类中传递 Runnable 实例,其中前者的 run() 方法需要后者的引用
- php - 重写规则 htaccess 让我发疯