简体   繁体   English

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

[英]Heroku: App not compatible with buildpack:

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 runtime.txt: python-3.7.0

requirements.txt: 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: 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. 我有Procfile,Requirements.txt和runtime.txt,所有这些文件都遵循所需的大小写和内容。

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. 如错误输出中所述,您的应用无法满足bin/detect脚本的要求,该脚本用于确认您确实在构建Python应用。 The detect script for the official Python buildpack is here . 官方Python buildpack的检测脚本在这里

Make sure that one of requirements.txt or setup.py is in the root directory, spelled correctly, and checked into git. 确保requirements.txtsetup.py之一在根目录中,拼写正确,并检入git。 Once you've done that the detect script should succeed and continue with the deploy. 完成之后, detect脚本应该会成功并继续进行部署。

It worked for me after adding requirements.txt and runtime.txt in the root folder of my Git Repo. 在我的Git Repo的根文件夹中添加了requirements.txt和runtime.txt之后,它对我有用。 Please make sure you have these files added. 请确保您已添加这些文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM