Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find that process type, Heroku

Tags:

python

heroku

I'm trying to deploy a simple python bot on Heroku but I get the error
couldn'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?

like image 776
Gerard22 Avatar asked Jan 30 '18 00:01

Gerard22


People also ask

Can't find that process type web Heroku?

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.

What is process type Heroku?

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.

Is Procfile a txt?

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.


2 Answers

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:

  1. remove your procfile
  2. git commit
  3. add a new procfile with the exact name "Procfile"
  4. commit again
  5. git push heroku master (or main - new heroku projects now uses main)

should work!

like image 79
Alon Gouldman Avatar answered Sep 20 '22 17:09

Alon Gouldman


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

like image 31
Ramandeep Singh Avatar answered Sep 20 '22 17:09

Ramandeep Singh