Yiling Liu
Yiling Liu

Reputation: 686

heroku - Couldn't find that process type (web)

I am following the tutorial here

but I got the error

Scaling dynos... !
 ▸    Couldn't find that process type (web).

when doing

heroku ps:scale web=1

I followed the solution here

by delete the buildpack and use heroku buildpacks:set heroku/python

But the error still happend

and for buildpacks:

heroku buildpacks
=== teaching-system Buildpack URL
heroku/python

it seem to be correct

What is wrong with it?

Upvotes: 0

Views: 14216

Answers (5)

developer6811
developer6811

Reputation: 198

This is what I did to past this error in Django. It's on Windows10

  • Add Procfile -in the same folder where you have git, manage.py
Procfile
-------------------------------
web: gunicorn <django-root-name(containing wsgi)>.wsgi --log-file -
  • Installing gunicorn(for later use)
    >python -m pip install gunicorn

  • Clearing BuildPacks & fixing them
    >heroku buildpacks:clear
    >heroku buildpacks:add heroku/python

  • commit(empty-commit) & push
    >git commit --allow-empty -m "Adjust push heroku master"
    git push heroku master
    That's what made me pass this scaling dyno.. blah blah

Update:

  • For local development, add following file
Procfile.windows
------------------------------------------
web: python manage.py runserver 0.0.0.0:5000

Upvotes: 7

nativelectronic
nativelectronic

Reputation: 862

in Django,i solved creating the next files:

--------------------------------------------
**Procfile.windows** :
web: python manage.py runserver 0.0.0.0:5000
-------------------------------------------
**requirements.txt** :
django
gunicorn
django-heroku
------------------------------------------
**runtime.txt** :
python-3.7.7
-------------------------------------------------------
**Procfile** :
web: gunicorn <name of my main folder app>.wsgi --log-file -
----------------------
**.env** :
TIMES=2
----------------------

and after just do a commit to local repository,so the steps will be:

* heroku login heroku create git commit -m "gogogo heroku" git push heroku master heroku ps:scale web=1 heroku open

*

Upvotes: 2

designDemon
designDemon

Reputation: 21

It may have happened if you have modified your Procfile or renamed it after pushing to Heroku master. If so, you can try to make it work by rebuilding the index.

In my case this worked:

  1. remove cached files (only the paths are removed from the index, not the real files!!!)

    git rm -r --cached .

  2. add all files to the index

    git add .

  3. commit

    git commit -m "hopefully fixed error"

  4. run rest of the heroku commands again

worked for me! hope it does for you.

Upvotes: 0

Yiling Liu
Yiling Liu

Reputation: 686

I solved this problem a few week later in another Flask project

It was caused by loosing library: gunicorn in current virtual environment

Upvotes: 0

Rajan
Rajan

Reputation: 73

Make sure that you have a Procfile that is in the same directory as your Pipfile and Pipfile.lock files.

I'm using django and in Procfile I had:

#Procfile
web: gunicorn <my_project_name>.wsgi --log-file -

Install gunicorn if you haven't already. I had the same error and spent a long time trying to resolve it so I hope this helps. The syntax will change depending on what framework and language you're using, but the idea should be similar.

Upvotes: 3

Related Questions