I can't seem to figure out why my Heroku push keeps failing after hours and hours of research. The app works just fine in my terminal.
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (12/12), 5.80 KiB | 5.80 MiB/s, done.
Total 12 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-buildpacks.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 agile-brook-99462.
remote:
To https://git.heroku.com/agile-brook-99462.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/agile-brook-99462.git'
Things I have done:
Set buildpack to heroku/python
Set Python version to 2.7 with runtime.txt
Added requirements.txt
Added Procfile
Tried git push -f heroku master
Created a new app and re-tried all steps again
None of the above steps have remedied the situation. Any tips?
Related
added requirement.txt, Procfile,
receving error while deploying site to heroku
what could be wrong with this
Enumerating objects: 110, done.
Counting objects: 100% (110/110), done.
Delta compression using up to 8 threads
Compressing objects: 100% (106/106), done.
Writing objects: 100% (110/110), 13.54 MiB | 1.30 MiB/s, done.
Total 110 (delta 35), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
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 covidcms.
remote:
To https://git.heroku.com/covidcms.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/covidcms.git'
You have to rename your requirement.txt file to requirements.txt
Heroku automatically recognizes your app as a Python app if it includes a requirements.txt or setup.py file in its root directory.
When a deployed application is recognized as a Python application, you’ll see this in the build output:
$ git push heroku master
-----> Python app detected
for more information check official doc. https://devcenter.heroku.com/articles/python-support#recognizing-a-python-app
I've been through a lot of possible answers from here to everywhere, and it seems the problem persists.
What is causing this, and how can I fix it?
$ git push heroku master
Counting objects: 295, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (272/272), done.
Writing objects: 100% (295/295), 678.12 KiB | 8.07 MiB/s, done.
Total 295 (delta 114), reused 0 (delta 0)
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 mydjangoappblog.
remote:
To https://git.heroku.com/mydjangoappblog.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mydjangoappblog.git'
My Procfile:
And gunicorn:
It seems your Procfile is not valid
Modify it as following:
web: gunicorn django_project.wsgi
I am trying to use $ git push heroku master but I get this error:
$ git push heroku master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 534 bytes | 534.00 KiB/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.5 (you are using , which is unsupported).
remote: ! We recommend upgrading by specifying the latest version (python-3.6.5).
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing
remote: ! Requested runtime () is not available for this stack (heroku-16).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to securibot.
remote:
To https://git.heroku.com/securibot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/securibot.git'
My runtime.txt file reads the following:
python-3.6.5
Any idea why I'm getting this error?
Did you read the referenced URL that was posted?
If you look through https://devcenter.heroku.com/articles/python-runtimes, you will see that "Newly created Python applications default to the Python 3.6.4 runtime".
You can specify your own run time in either your Pipfile or creating a runtime.txt with the following:
python-3.6.5
I am trying to push an django web app to heroku for the first time, and there are some error message as following.
Delta compression using up to 4 threads.
Compressing objects: 100% (68/68), done.
Writing objects: 100% (81/81), 105.31 KiB | 0 bytes/s, done.
Total 81 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing Python-3.5.0
remote: ! Requested runtime (Python-3.5.0) is not available for this stack
(cedar-14).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/pytho
n-support
remote:
remote: ! Push rejected, failed to compile Python app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to polar-lake-12528.
remote:
To https://git.heroku.com/polar-lake-12528.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/polar-lake-12528.git'
My runtime.txt looks like:
python-3.5.1
I have already changed to lowercase and update the version of python to 3.5.1, but still not working.
Python 3.5.0 is not supported. You can change it to python-3.5.1.
See https://devcenter.heroku.com/articles/python-runtimes#supported-python-runtimes for supported runtimes.
I am trying to deploy a django application on heroku.
Here is my proc file:
web: gunicorn playlist.wsgi --log-file -
Here is my requirments.txt:
dj-database-url==0.4.1
Django==1.9.6
gunicorn==19.5.0
whitenoise==3.0
Here is the error messege on git push heroku master
Counting objects: 191, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (173/173), done.
Writing objects: 100% (191/191), 105.35 KiB | 0 bytes/s, done.
Total 191 (delta 91), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/python
remote:
remote: ! Push rejected, failed to detect set buildpack heroku/python
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to shielded-fortress-12681.
remote:
To https://git.heroku.com/shielded-fortress-12681.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/shielded-fortress-12681.git'
EDIT
I have also tried:
heroku buildpacks:set heroku/python
I was putting the Procfile in the wrong place. It should be at the root of your repository.