本文介绍了Procfile未找到,Heroku python应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行heroku python演示并遇到Procfile问题。我把它放在正确的目录中(与requirements.txt,venv /和app.py一起),并且文件是Procfile,没有.txt扩展名(如其他问题所示)。



Procfile的内容是:

  web:python app.py 

但是,在运行领班启动时,我仍然收到Procfile不存在错误。在我的智慧结尾,任何建议,将不胜感激。

干杯,
塞恩



编辑: Retried使用echo命令而不是编辑器创建Procfile -

  echoweb:python app.py> Procfile 

之后工作,谢谢。

解决方案

只需添加一个答案,以便可以关闭该答案(或从未答复的问题部分移除)。



注释,请尝试使用 echo 命令创建文件而不是编辑器。我怀疑这是因为大多数编辑添加了一个换行符,那么heroku会遇到困难。



示例解决方案(来自qn):

  echoweb:python app.py> Procfile 


Doing the heroku python demo and having problems with Procfile. I have it in the right directory (alongside requirements.txt, venv/, and app.py) and the file is "Procfile" without .txt extension (as other questions suggest).

Contents of Procfile are:

web: python app.py

Nonetheless, I keep getting the "Procfile does not exist" error when running "foreman start." At my wits end, any suggestions would be appreciated.

Cheers,Thain

EDIT: Retried creating "Procfile" using echo command rather than an editor -

echo "web: python app.py" > Procfile

worked after that, thanks.

解决方案

Just adding an answer so that this can be closed (or moved from the unanswered questions section).

As noted in the comments, try using the echo command to create the file rather than an editor. I suspect that this is because of a newline char added by most editors that heroku is having a difficult time with.

Example solution (from qn):

echo "web: python app.py" > Procfile

这篇关于Procfile未找到,Heroku python应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 09:36