Heroku Py deployment error 'App not compatible with buildpack' - python

Other similar issues with answers have not resolved my issue. My deployment method is GitHub and I've not run into an issue with pushing to the repo, however, nothing seems to be able to run. I did set the build pack to Python in the settings of my Heroku app.
For reference, this is my repo I'm using for deployment: https://github.com/EhabJames/MC-Bot-Disc
Full Error:
App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed

Related

Heroku things my build pack is node.js when its python

I made a package.json and added:
Heroku buildpacks:set heroku/python
It still fails when deploying. This is a python app so I don't know what is happening.
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Node.js app detected
parse error: Invalid numeric literal at line 1, column 7
! Unable to parse package.json
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
For apps that do not have a buildpack explicitly set, Heroku tries to detect which buildpack to use in the following order:
Ruby
Node.js
Clojure
Python
...
Buildpack detection is based on the presence of certain files. In the case of the Node.js buildpack, it looks for a package.json in the root directory of the project. It looks like your app has such a file.
Your question isn't entirely clear, but I think you put this text inside your package.json:
Heroku buildpacks:set heroku/python
That is not valid, so the Node.js buildpack doesn't know what to do with it.
A package.json file is from the Node.js ecosystem, and it must have a specific set of keys and values. Unless your application also requires Node.js, you shouldn't have a package.json file at all. Assuming you don't need that file, delete it and commit its removal.
Your Python project will need one of the following:
requirements.txt
setup.py
Pipfile and Pipfile.lock
If you already have one of these, great. Just redeploy and Heroku should detect your app as a Python app.
If you don't have any of these, the easiest thing to do is to place an empty requirements.txt file in the root of your project. Make sure to commit it before deploying again.
If you wish to be explicit, you can run the command you tried to use before on the command line:
heroku buildpacks:set heroku/python
This shouldn't be necessary for a single-language app, though. Note that heroku is all lowercase.

Requested runtime (python-) is not available for this stack (heroku-20)

I am stuck trying to deploy this Flask App through Heroku. I've researched multiple ways to go about it, but can't seem a way to find it to work. This is what I get when I push to git push heroku master
remote: -----> Building on the Heroku-20 stack
remote: -----> Python app detected
remote: ! Requested runtime (python-) 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.
I've cleared & set up build pack and is currently:
=== wonders141 Buildpack URL
heroku/python
The runtime.txt contains:
python-3.9.1
I'm not sure why the error message doesn't define the python version, so I'm at a lost of how to go about this.
This may be a late answer, but you have to use a newline after python-3.9.6 in runtime.txt
Your python version is not supported on heroku stack 20 - and make sure your python version in runtime is in lower case - see below
I figured how to get past this. I had cleared everything in my requirements.txt and left only the packages I needed. Apparently a lot of unnecessary packages were included.
I had the same problem with Django and I just upgrade python version to One of the supported versions in heroku, then I modified the (runtime.txt) file with the new version python-3.10.7
then I run git's commands like :
git status
git add -A
git commit -m "with any name you want"
git push heroku main --force

Heroku: Python Django deployment suddenly failing

I deployed my app this morning all fine, it has been running for months, I have just tried to deploy a change to two HTML template (nothing else has changed in GIT). Heroku is suddenly failing with the below
-----> Python app detected
! Requested runtime (python-3.6.10) is not available for this stack (heroku-18).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed
I can't even see anywhere I've specified a python version in Django, not in requirements.txt, but nothing has changed in this respect for months on the apps?
Any ideas greatly appreciated
In the article it links in your error trace it states that they support runtime python-3.6.11 meanwhile it appears your application is still on python-3.6.10. They probably upgraded the version of python they support.

Why is my Python app not compatible with Heroku's Python buildpack

I know this has been asked multiple times before but none of the answers seem to work for my particular case. I created a new Github repository and uploaded the following files to it via the Github desktop client (I tried uploading from the website as well):
Counter.py
Procfile
requirments.txt
The app itself works when I test it locally. This is the Procfile:
worker: python Counter.py
requirments.txt:
git+https://github.com/Rapptz/discord.py
dnspython==1.16.0
PyNaCl==1.3.0
async-timeout==3.0.1
I receive the following error every time I try to deploy it from my Github repository:
-----> App not compatible with buildpack: https://buildpack-
registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
I just don't understand why it isn't compatible with the buildpack but every other app I made is. I tried deploying other apps from other repositories and it worked just fine. Thanks for reading.
You wrote requirments.txt twice instead of requirements.txt.

Error when deploying Django app on Heroku

I am trying to deploy new code at Heroku. The changes I made are simple, no changes to settings or requirements or anything fundamental.
However, when running git push, I get...
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-python.git
=====> Detected Framework: Python
-----> Installing requirements with pip
ImportError: No module named site
! Push rejected, failed to compile Multipack app.
! Push failed
Does anybody have a clue what may be going on here?
I found similar questions already posted, but no clear answer and the proposed solutions didn't work in this case.
Heroku support suggested so far:
$ heroku config:unset PYTHONPATH
$ heroku config:unset PYTHONHOME
Following this, the deployment was possible, but the application stopped working.
By adding those variables back, the application was online again, but deployment would again fail.
Looking for a Solution for two days now - I would appreciate any advice.
requirements.txt file is here.
In this case, the solution to the problem is to remove only the PYTHONHOME variable. The other variable is needed.
The reason was a change in heroku-buildpack-python.
More info here:
https://github.com/heroku/heroku-buildpack-python/issues/457

Categories

Resources