gpt4 book ai didi

python - 将 YAML 转换为 JSON 时出错 : yaml: line 3: did not find expected key

转载 作者:太空宇宙 更新时间:2023-11-03 19:52:24 25 4
gpt4 key购买 nike

我已经准备好了一个 docker 应用程序。现在我想在服务器heroku上实现它,不幸的是在命令执行过程中返回了一个错误。

git push heroku master

我收到此错误消息

Enumerating objects: 466, done.
Counting objects: 100% (466/466), done.
Delta compression using up to 4 threads
Compressing objects: 100% (442/442), done.
Writing objects: 100% (466/466), 10.30 MiB | 1008.00 KiB/s, done.
Total 466 (delta 83), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: === Fetching app code
remote:
remote: =!= Build failed due to an error:
remote:
remote: =!= validate step: error converting YAML to JSON: yaml: line 3: did not find expected key
remote:
remote: If this persists, please contact us at https://help.heroku.com/.
remote: Verifying deploy...
remote:
remote: ! Push rejected to powerful-cove-75131.
remote:
To https://git.heroku.com/powerful-cove-75131.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/powerful-cove-75131.git'

我的 heroku.yml 文件如下所示

setup:
addons:
- plan: heroku-postgresql
build:
docker:
web: Dockerfile
release:
image: web
command:
- python manage.py collectstatic --noinput
run:
web: gunicorn pvb.wsgi

最佳答案

根据 this缩进不匹配。应该是这样的

    setup:
addons:
- plan: heroku-postgresql
as: database
build:
docker:
web: Dockerfile
release:
image: web
command:
- python manage.py collectstatic --noinput
run:
web: gunicorn pvb.wsgi

关于python - 将 YAML 转换为 JSON 时出错 : yaml: line 3: did not find expected key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59750319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com