我已经准备好部署到Google Cloud平台,但我遇到了一个问题。网站无法部署。以下是代码显示的内容:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/jinthemix/app.yaml]
Unexpected attribute 'pi_version' for object of type AppInfoExternal.
in "/home/jinthemix/app.yaml", line 1, column 13下面是app.yaml。我使用vim app.yaml进入代码。我搞不懂为什么它看起来和我想用的代码不一样。所以我想知道如何编辑app.yaml以便部署。

这是我想要使用的代码:
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
- url: /(.*)
static_files: www/\1
upload: www/(.*)(附注:如何链接index.html?(当有人导航到您网站的根页面时,他在点击或转到网站链接时看到的内容)这里是html所在的位置:
jinthemix@cloudshell:~ (website-deploying-gc)$ ls
app.yaml IMD233 Files README-cloudshell.txt README.md www
jinthemix@cloudshell:~ (website-deploying-gc)$ cd www
jinthemix@cloudshell:~/www (website-deploying-gc)$ ls
Mixs
jinthemix@cloudshell:~/www (website-deploying-gc)$ cd Mixs
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ ls
'Mix 1 (1)' 'Mix 2 (2)' 'Mix 3 (3)' 'Mix 4 (4)'
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ cd 'Mix (1)'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ ls
'hello.html (B) (L2).html' 'hello.html (T) (L3).html' 'hello (L1).html'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ cd
jinthemix@cloudshell:~ (website-deploying-gc)$ cd发布于 2021-01-23 18:11:54
通常,您可以使用任何可以读取YAML files的文本编辑器程序来编辑任何app.yaml文件。
我看到您正在使用Cloud Shell来部署您的应用程序。
您可以使用UNIX支持的任何文本编辑器(例如vim或nano),并通过运行每个程序用于打开并保存编辑后的文件的相关命令,从终端编辑文件。
如果您发现从终端使用上述任何程序具有挑战性,并且喜欢更直观友好的界面,请按照docs上提到的步骤利用Cloud Shell编辑器(基本上只需单击Cloud Shell上的Open Editor按钮,找到文件并进行编辑,就像使用记事本一样)。
https://stackoverflow.com/questions/65855477
复制相似问题