Heroku:应用程序与buildpack不兼容:

时间:2018-10-18 05:17:30

标签: python git heroku

Enumerating objects: 88, done.
Counting objects: 100% (88/88), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (88/88), 24.46 KiB | 6.12 MiB/s, done.
Total 88 (delta 42), reused 88 (delta 42)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-    registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to block-monitor.
remote:
To https://git.heroku.com/block-monitor.git
 ! [remote rejected] master -> master (pre-receive hook declined)

dir:

10/17/2018  09:58 PM    <DIR>          .
10/17/2018  09:58 PM    <DIR>          ..
10/05/2018  08:30 PM                93 .gitignore
10/05/2018  08:30 PM            10,283 bbot.py
10/05/2018  08:30 PM            35,966 LICENSE
10/17/2018  09:58 PM                18 Procfile
08/21/2018  06:22 PM                97 README.md
10/17/2018  09:56 PM               962 requirements.txt
10/17/2018  09:53 PM                12 runtime.txt
08/21/2018  06:22 PM                15 tokenfile.example
10/17/2018  10:02 PM                59 tokenfile.txt
10/05/2018  08:30 PM               131 tox.ini
              10 File(s)         47,636 bytes
               2 Dir(s)  128,269,000,704 bytes free

runtime.txt: python-3.7.0

requirements.txt:

alabaster==0.7.11
astroid==2.0.1
async-timeout==3.0.0
atomicwrites==1.1.5
attrs==18.1.0
Babel==2.6.0
beautifulsoup4==4.6.3
certifi==2018.4.16
cffi==1.11.5
...

Procfile: worker: py bbot.py

对不起,如果格式损坏! 我已经添加了所有内容,但我不知道为什么它不起作用。 任何想法?我有Procfile,Requirements.txt和runtime.txt,所有这些文件都遵循所需的大小写和内容。

2 个答案:

答案 0 :(得分:1)

在我的Git Repo的根文件夹中添加了requirements.txt和runtime.txt之后,它对我有用。 请确保您已添加这些文件。

答案 1 :(得分:0)

如错误输出中所述,您的应用无法满足bin/detect脚本的要求,该脚本用于确认您确实在构建Python应用。官方Python buildpack的检测脚本为here

确保requirements.txtsetup.py中的一个在根目录中,拼写正确,并检入git。完成操作后,detect脚本应该会成功并继续进行部署。