它刚刚为Python设置时,无法检测到set buildpack?

Dou*_*ong 7 heroku

由于以下错误,我一直试图将django网络应用程序推送到heroku但无济于事:

(venv)douglaswong@Douglas-MacBook-Pro ~/testing (testing)$ git push heroku master
Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (53/53), 41.11 KiB | 0 bytes/s, done.
Total 53 (delta 12), reused 48 (delta 11)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching set buildpack git://github.com/heroku/heroku-buildpack-python.git... done
remote:
remote:  !     Push rejected, failed to detect set buildpack git://github.com/heroku/heroku-buildpack-python.git
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: Verifying deploy...
remote:
remote: !   Push rejected to sleepy-spire-9508.
remote:
To https://git.heroku.com/sleepy-spire-9508.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sleepy-spire-9508.git'
Run Code Online (Sandbox Code Playgroud)

它说它无法检测到set buildpack.但是,我已经设置了它

(venv)douglaswong@Douglas-MacBook-Pro ~/testing (testing)$ heroku create --buildpack git://github.com/heroku/heroku-buildpack-python.git
Creating fierce-waters-9228... done, stack is cedar-14
Buildpack set. Next release on fierce-waters-9228 will use git://github.com/heroku/heroku-buildpack-python.git.
https://fierce-waters-9228.herokuapp.com/ | https://git.heroku.com/fierce-waters-9228.git
Run Code Online (Sandbox Code Playgroud)

造成这种情况的可能原因是什么?我目前在我的根目录中有这些文件,如果它有所不同:

Procfile         angellistJob     venv
README.md        requirements.txt
Run Code Online (Sandbox Code Playgroud)

任何建议表示赞赏,谢谢!

Lui*_*ien 7

我有类似的问题.对我来说问题是我忘记将更改提交到我的本地仓库.

此外,请确保您提交到您正在推送的同一分支.

希望这可以帮助!


Rau*_*har 5

只是为了引起任何有同样问题的人的注意.即使我有同样的问题,并承诺我正在推动的确切分支.但是,由于我没有requirements.txt文件,因此推送被拒绝.
因此,在推送到heroku之前,还要确保你有Procfile和requirements.txt.