I'm trying to deploy a simple python bot on Heroku but I get the errorcouldn't find that process type
When I try to scale the dynos. I already made a procfile and it looks like this:web: gunicorn dep:app
, where "dep" is the name of my python code
What could be the reason?
This may happen if your procfile is misspelt, such as "procfile" or "ProcFile" etc. The file name should be "Procfile" (with a capital P). sometimes changing the file name is not anough, because git wouldn't spot the change.
There are three primary process types: Web dynos: receive HTTP traffic from routers and typically run web servers. Worker dynos: execute anything else, such as background jobs, queuing systems, and timed jobs. One-off dynos: are temporary and not part of an ongoing dyno formation.
Procfile naming and location The Procfile is always a simple text file that is named Procfile without a file extension. For example, Procfile. txt is not valid.
This may happen if your procfile is misspelt, such as "procfile" or "ProcFile" etc. The file name should be "Procfile" (with a capital P).
sometimes changing the file name is not anough, because git wouldn't spot the change. I had to delete the Procfile completely, then commit the change, than add it again with the right name, and then commit that again:
git push heroku master
(or main
- new heroku projects now uses main
)should work!
Make Sure Procfile should not have any extension like .txt otherwise this will be the error
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
To create file without extension type following in cmd
notepad Procfile.
Now add web: gunicorn dep:app
and save
Now when you will git push heroku master the above lines will be like
remote: -----> Discovering process types
remote: Procfile declares types -> web
And the error is gone when you will run
C:\Users\Super-Singh\PycharmProjects\URLShortener>heroku ps:scale web=1
Scaling dynos... done, now running web at 1:Free
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With