Home > Software design >  Application Error on Heroku (Django Web-App)
Application Error on Heroku (Django Web-App)

Time:03-05

I am trying to deploy my Django web-app on Heroku. Build succeeds but still I get an Application Error. Below are my app's logs.

Logs:

2022-03-04T12:47:48.701018 00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2022-03-04T12:47:48.701018 00:00 app[web.1]: ModuleNotFoundError: No module named 'SASTRAScrapper'
2022-03-04T12:47:48.701025 00:00 app[web.1]: [2022-03-04 12:47:48  0000] [9] [INFO] Worker exiting (pid: 9)
2022-03-04T12:47:48.745701 00:00 app[web.1]: [2022-03-04 12:47:48  0000] [4] [WARNING] Worker with pid 9 was terminated due to signal 15
2022-03-04T12:47:48.841738 00:00 app[web.1]: [2022-03-04 12:47:48  0000] [4] [INFO] Shutting down: Master
2022-03-04T12:47:48.841740 00:00 app[web.1]: [2022-03-04 12:47:48  0000] [4] [INFO] Reason: Worker failed to boot.
2022-03-04T12:47:49.032701 00:00 heroku[web.1]: Process exited with status 3
2022-03-04T12:47:49.097253 00:00 heroku[web.1]: State changed from up to crashed
2022-03-04T12:48:02.499473 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sastra-scraper.herokuapp.com request_id=f5454869-83fe-41bc-a081-a0b11b419ad1 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:48:03.140143 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sastra-scraper.herokuapp.com request_id=8e31ba10-6112-41f6-b8f8-6c58e86acb4a fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:00.300756 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sastra-scraper.herokuapp.com request_id=e0c472d9-2ce4-4c99-9048-87e95a834255 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:00.916514 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sastra-scraper.herokuapp.com request_id=f4a4d43f-aa19-4784-9602-f897e2a71238 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:04.938317 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sastra-scraper.herokuapp.com request_id=8e3167e6-c97e-42e7-8fe0-1e2a5136acc4 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:05.403850 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sastra-scraper.herokuapp.com request_id=42a92e54-37cc-483d-8766-081783ac8695 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:27.736824 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sastra-scraper.herokuapp.com request_id=1e7767fc-74d8-4c4d-917d-a5e39c798823 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https
2022-03-04T12:49:28.323634 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sastra-scraper.herokuapp.com request_id=41740811-72fc-4360-90f3-4d14a3c27b96 fwd="122.161.254.213" dyno= connect= service= status=503 bytes= protocol=https

GitHub Repo

Kindly help me out!

CodePudding user response:

You have a typo in your SASTRAScraper/wsgi.py.

Change

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SASTRAScrapper.settings')

to

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SASTRAScraper.settings')

so it matches the actual directory name.

This typo is also present in SASTRAScraper/asgi.py and a comment in SASTRAScraper/urls.py. I suspect you spelled this the wrong way when you first ran django-admin.py startproject.

  • Related