0
votes

Someone made a discord bot that runs on Python code but for some reason it wont run on heroku. This is the build/error log that I got.

-----> 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

But I added python as a buildpack (with the menu/application settings from Heroku)

And these are the install instructions for if you want to run the code on your local machine: >>Intructions for local machine

Is there anyway to run this on Heroku or is the app just not compatible?

Kind regards,

Ruben

1

1 Answers

3
votes

You can either host your code in Github like this example here or upload your file directly from your computer using Heroku's CLI and Git

After that Go to

Heroku --> Deploy

Under Development Method Pick Heroku Git and it'll have instructions

You'll have to create a file named requirements.txt in which you will put the names of the python modules that you want to use which is does not come as a standard part of Python. Second, you'll need a file called Procfile without any extensions, inside it decide your dynos. In your case, it will be worker: python the_file_to_run.py

I recommend you look at this example here in Github to get a better understanding