Heroku: App not compatible with buildpack:

你说的曾经没有我的故事 提交于 2021-02-11 04:58:20

问题


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

Sorry if the formatting is broken! I've added everything, I have no idea why it isn't working. Any idea? I have the Procfile, requirements.txt, and runtime.txt, all of which follow the needed casing and content.


回答1:


It worked for me after adding requirements.txt and runtime.txt in the root folder of my Git Repo. Please make sure you have these files added.




回答2:


As mentioned in the error output, your app is failing to satisfy the bin/detect script which is used to confirm that you're really building a Python app. The detect script for the official Python buildpack is here.

Make sure that one of requirements.txt or setup.py is in the root directory, spelled correctly, and checked into git. Once you've done that the detect script should succeed and continue with the deploy.



来源:https://stackoverflow.com/questions/52867403/heroku-app-not-compatible-with-buildpack

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!