我刚刚安装了 flask
和 heroku
,尽管创建一个简单的应用程序没有问题,但现在我下载了包含我想要添加的现成代码的 .zip 文件并在我的 heroku
配置文件上运行这个应用程序。
我收到以下错误:
heroku ps:scale web=1
Scaling dynos... failed
! Couldn't find that formation.
配置文件:
web: gunicorn nameapp:app --log-file -
最佳答案
如您所料,这几乎肯定与您的 Procfile
有关。首先要检查一些明显的(引用 Heroku.com ):
A Procfile is a file named
Procfile
. It should be namedProcfile
exactly, and not anything else. For example,Procfile.txt
is not valid. The file should be a simple text file. The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
如果这没有帮助,您的 Procfile
可能被 git
忽略了。在这里查看类似的问题:How to overcome 'Coudn't find that formation' error when adding web dynos to Heroku django app?
关于python - 将 web dynos 添加到 Heroku flask 应用程序时出现“找不到该编队”错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33583337/