Heroku无法检测到Procfile(Pycharm)

时间:2020-08-08 17:06:23

标签: python heroku deployment procfile

我也尝试过使用echo命令,我也将它放在github上,但是由于某种原因,它不会被检测到。 这是我在Procfile`“ worker:python main.py”

中所拥有的

这是构建日志:

-----> Python app detected
-----> Installing python-3.8.5
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting certifi==2020.6.20
         Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
       Collecting chardet==3.0.4
         Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
       Collecting idna==2.10
         Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
       Collecting oauthlib==3.1.0
         Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
       Collecting PySocks==1.7.1
         Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)
       Collecting requests==2.24.0
         Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
       Collecting requests-oauthlib==1.3.0
         Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
       Collecting six==1.15.0
         Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
       Collecting tweepy==3.9.0
         Downloading tweepy-3.9.0-py2.py3-none-any.whl (30 kB)
       Collecting urllib3==1.25.10
         Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
       Installing collected packages: certifi, chardet, idna, oauthlib, PySocks, urllib3, requests, requests-oauthlib, six, tweepy
       Successfully installed PySocks-1.7.1 certifi-2020.6.20 chardet-3.0.4 idna-2.10 oauthlib-3.1.0 requests-2.24.0 requests-oauthlib-1.3.0 six-1.15.0 tweepy-3.9.0 urllib3-1.25.10
-----> Discovering process types
-----> Compressing...
       Done: 53.2M
-----> Launching...
       Released v3
       https://twitterbot1k.herokuapp.com/ deployed to Heroku

`

1 个答案:

答案 0 :(得分:0)

您是否已在根目录中添加了requirements.txt文件?当我忘记添加Requirements.txt时,我遇到了类似的问题。如果您不需要任何额外的软件包,请创建一个空文件。它告诉Heroku您的应用程序是用Python编写的。