0

I am trying to deploy my app to Heroku for the first time and I am running into the following error when trying to push using git:

I've also tried git push heroku HEAD:main and git push heroku master with the same results. Is this a branch issue? What else could drive this?

C:\Users\New User\Downloads\django-modal-ajax-crud-main\django-modal-ajax-crud-main>git push heroku main
Enumerating objects: 185, done.
Counting objects: 100% (185/185), done.
Delta compression using up to 4 threads
Compressing objects: 100% (169/169), done.
Writing objects: 100% (185/185), 72.21 MiB | 1.29 MiB/s, done.
Total 185 (delta 33), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote:  !     Requested runtime ("python-3.8.7") is not available for this stack (heroku-20).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: ed5e29f5eae1f6c87fe608824165f38e3146d5af
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version ed5e29f5eae1f6c87fe608824165f38e3146d5af
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to fast-citadel-45516.
remote:
To https://git.heroku.com/fast-citadel-45516.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fast-citadel-45516.git'
torek
  • 448,244
  • 59
  • 642
  • 775
RCarmody
  • 712
  • 1
  • 12
  • 29
  • *Git* has nothing to do with this. Heroku is rejecting your code. Git is merely the data channel through which your code gets to Heroku, and Heroku's answer (in this case, "no") comes back to you. Read the `remote:` messages. – torek Jan 25 '22 at 04:45
  • Okay, but why is my code being rejected? I don't see any details here – RCarmody Jan 25 '22 at 05:01
  • The answer is in the logs if you read through them carefully: Requested runtime ("python-3.8.7") is not available for this stack (heroku-20). See also https://devcenter.heroku.com/articles/python-support#recognizing-a-python-app – solarissmoke Jan 25 '22 at 05:11
  • It's the first `!` line (they mark their more-important lines with `!`): `Requested runtime ("python-3.8.7") is not available for this stack (heroku-20).` – torek Jan 25 '22 at 05:45

0 Answers0