user13137381
user13137381

Reputation: 135

heroku procfile problem : ModuleNotFoundError: No module named 'myApp.wsgi'

I' m deploying my first django app on heroku. After deploy the heroku doesn't launch my app. After checking heroku logs --tail I have got an error:

: ModuleNotFoundError: No module named 'tabele.wsgi'

My procfile looks like:

web: gunicorn tabele.wsgi:application --log-file -

I tries also:

web: gunicorn tabele:app

web: gunicorn tabele.wsgi --log-file -

I'm beginner and I don't understand if (in my case 'tabele') should be folder containing manage.py or the different one? In my project folders including manage.py and another one including settings.py and wsgi.py has the same name "tabele" Could you explain me what is what in procfile file for better understanding?

Any idea what I'm doing wrong?

Upvotes: 3

Views: 1824

Answers (1)

Pradip Kachhadiya
Pradip Kachhadiya

Reputation: 2235

djangoherokuapp
  |-- tabele/
    |     |---  __init_-.py
    |     |---  settings.py
    |     |---  urls.py
    |     |---  wsgi.py
    |----- manage.py
    |------Procfile  ⬅⬅⬅
    |------requirements.txt
    |----- app/
    |     |---  admin.py
    |     |---  apps.py
    |     |---  __init__.py
    |     |---  models.py
    |     |---  tests.py
    |     |---  views.py
  • Add a Procfile in the project root directory to define process types and explicitly declare what command should be executed to start your app.

  • Open the Procfile and add the line below:

    web: gunicorn tabele.wsgi --log-file -

  • --log-file - means "log to stdout". The --log-file flag lets you set a path to a log file, and - means "stdout" (in this context).

Or try with:

 web: gunicorn tabele.wsgi

Upvotes: 2

Related Questions