Heroku Deployment : ModuleNotFoundError: No module named 'django_summernote' - django

During the deployment for my python django blog app, this happening keeps continuing! so I don't know how to deal with it anymore. Actually I've found the sticking error ModuleNotFoundError: No module named 'django_summernote'.
I solved many previous errors, h10, h14 but the ModuleNotFoundError still exists.
in my Installed App in setting.py, it doesn't have any problem with it.
So I couldn't catch up..
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'articles',
'templates',
'django_summernote',
'sorl.thumbnail',
'gunicorn',
]
and below is the Error part
State changed from crashed to starting
2018-12-10T13:25:48.417441+00:00 heroku[web.1]: Starting process with command `gunicorn djangoblog.wsgi:application --log-file - --log-level debug`
2018-12-10T13:25:48.000000+00:00 app[api]: Build succeeded
2018-12-10T13:25:51.553811+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [DEBUG] Current configuration:
2018-12-10T13:25:51.553836+00:00 app[web.1]: config: None
2018-12-10T13:25:51.553838+00:00 app[web.1]: bind: ['0.0.0.0:47277']
2018-12-10T13:25:51.553839+00:00 app[web.1]: backlog: 2048
2018-12-10T13:25:51.553841+00:00 app[web.1]: workers: 2
2018-12-10T13:25:51.553842+00:00 app[web.1]: worker_class: sync
2018-12-10T13:25:51.553844+00:00 app[web.1]: threads: 1
2018-12-10T13:25:51.553845+00:00 app[web.1]: worker_connections: 1000
2018-12-10T13:25:51.553847+00:00 app[web.1]: max_requests: 0
2018-12-10T13:25:51.553848+00:00 app[web.1]: max_requests_jitter: 0
2018-12-10T13:25:51.553850+00:00 app[web.1]: timeout: 30
2018-12-10T13:25:51.553851+00:00 app[web.1]: graceful_timeout: 30
2018-12-10T13:25:51.553852+00:00 app[web.1]: keepalive: 2
2018-12-10T13:25:51.553854+00:00 app[web.1]: limit_request_line: 4094
2018-12-10T13:25:51.553855+00:00 app[web.1]: limit_request_fields: 100
2018-12-10T13:25:51.553857+00:00 app[web.1]: limit_request_field_size: 8190
2018-12-10T13:25:51.553858+00:00 app[web.1]: reload: False
2018-12-10T13:25:51.553859+00:00 app[web.1]: reload_engine: auto
2018-12-10T13:25:51.553861+00:00 app[web.1]: reload_extra_files: []
2018-12-10T13:25:51.553862+00:00 app[web.1]: spew: False
2018-12-10T13:25:51.553864+00:00 app[web.1]: check_config: False
2018-12-10T13:25:51.553865+00:00 app[web.1]: preload_app: False
2018-12-10T13:25:51.553866+00:00 app[web.1]: sendfile: None
2018-12-10T13:25:51.553868+00:00 app[web.1]: reuse_port: False
2018-12-10T13:25:51.553869+00:00 app[web.1]: chdir: /app
2018-12-10T13:25:51.553871+00:00 app[web.1]: daemon: False
2018-12-10T13:25:51.553872+00:00 app[web.1]: raw_env: []
2018-12-10T13:25:51.553873+00:00 app[web.1]: pidfile: None
2018-12-10T13:25:51.553875+00:00 app[web.1]: worker_tmp_dir: None
2018-12-10T13:25:51.553876+00:00 app[web.1]: user: 50242
2018-12-10T13:25:51.553878+00:00 app[web.1]: group: 50242
2018-12-10T13:25:51.553879+00:00 app[web.1]: umask: 0
2018-12-10T13:25:51.553880+00:00 app[web.1]: initgroups: False
2018-12-10T13:25:51.553882+00:00 app[web.1]: tmp_upload_dir: None
2018-12-10T13:25:51.553900+00:00 app[web.1]: secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
2018-12-10T13:25:51.553902+00:00 app[web.1]: forwarded_allow_ips: ['*']
2018-12-10T13:25:51.553904+00:00 app[web.1]: accesslog: -
2018-12-10T13:25:51.553905+00:00 app[web.1]: disable_redirect_access_to_syslog: False
2018-12-10T13:25:51.553907+00:00 app[web.1]: access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
2018-12-10T13:25:51.553908+00:00 app[web.1]: errorlog: -
2018-12-10T13:25:51.553909+00:00 app[web.1]: loglevel: debug
2018-12-10T13:25:51.553911+00:00 app[web.1]: capture_output: False
2018-12-10T13:25:51.553912+00:00 app[web.1]: logger_class: gunicorn.glogging.Logger
2018-12-10T13:25:51.553914+00:00 app[web.1]: logconfig: None
2018-12-10T13:25:51.553915+00:00 app[web.1]: logconfig_dict: {}
2018-12-10T13:25:51.553917+00:00 app[web.1]: syslog_addr: udp://localhost:514
2018-12-10T13:25:51.553918+00:00 app[web.1]: syslog: False
2018-12-10T13:25:51.553919+00:00 app[web.1]: syslog_prefix: None
2018-12-10T13:25:51.553921+00:00 app[web.1]: syslog_facility: user
2018-12-10T13:25:51.553923+00:00 app[web.1]: enable_stdio_inheritance: False
2018-12-10T13:25:51.553924+00:00 app[web.1]: statsd_host: None
2018-12-10T13:25:51.553925+00:00 app[web.1]: statsd_prefix:
2018-12-10T13:25:51.553927+00:00 app[web.1]: proc_name: None
2018-12-10T13:25:51.553928+00:00 app[web.1]: default_proc_name: djangoblog.wsgi:application
2018-12-10T13:25:51.553930+00:00 app[web.1]: pythonpath: None
2018-12-10T13:25:51.553931+00:00 app[web.1]: paste: None
2018-12-10T13:25:51.553933+00:00 app[web.1]: on_starting: <function OnStarting.on_starting at 0x7facbfe22268>
2018-12-10T13:25:51.553934+00:00 app[web.1]: on_reload: <function OnReload.on_reload at 0x7facbfe22378>
2018-12-10T13:25:51.553936+00:00 app[web.1]: when_ready: <function WhenReady.when_ready at 0x7facbfe22488>
2018-12-10T13:25:51.553937+00:00 app[web.1]: pre_fork: <function Prefork.pre_fork at 0x7facbfe22598>
2018-12-10T13:25:51.553939+00:00 app[web.1]: post_fork: <function Postfork.post_fork at 0x7facbfe226a8>
2018-12-10T13:25:51.553940+00:00 app[web.1]: post_worker_init: <function PostWorkerInit.post_worker_init at 0x7facbfe227b8>
2018-12-10T13:25:51.553942+00:00 app[web.1]: worker_int: <function WorkerInt.worker_int at 0x7facbfe228c8>
2018-12-10T13:25:51.553943+00:00 app[web.1]: worker_abort: <function WorkerAbort.worker_abort at 0x7facbfe229d8>
2018-12-10T13:25:51.553945+00:00 app[web.1]: pre_exec: <function PreExec.pre_exec at 0x7facbfe22ae8>
2018-12-10T13:25:51.553946+00:00 app[web.1]: pre_request: <function PreRequest.pre_request at 0x7facbfe22bf8>
2018-12-10T13:25:51.553948+00:00 app[web.1]: post_request: <function PostRequest.post_request at 0x7facbfe22c80>
2018-12-10T13:25:51.553949+00:00 app[web.1]: child_exit: <function ChildExit.child_exit at 0x7facbfe22d90>
2018-12-10T13:25:51.553950+00:00 app[web.1]: worker_exit: <function WorkerExit.worker_exit at 0x7facbfe22ea0>
2018-12-10T13:25:51.553952+00:00 app[web.1]: nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7facbfe2f048>
2018-12-10T13:25:51.553953+00:00 app[web.1]: on_exit: <function OnExit.on_exit at 0x7facbfe2f158>
2018-12-10T13:25:51.553955+00:00 app[web.1]: proxy_protocol: False
2018-12-10T13:25:51.553956+00:00 app[web.1]: proxy_allow_ips: ['127.0.0.1']
2018-12-10T13:25:51.553958+00:00 app[web.1]: keyfile: None
2018-12-10T13:25:51.553959+00:00 app[web.1]: certfile: None
2018-12-10T13:25:51.553961+00:00 app[web.1]: ssl_version: 2
2018-12-10T13:25:51.553962+00:00 app[web.1]: cert_reqs: 0
2018-12-10T13:25:51.553963+00:00 app[web.1]: ca_certs: None
2018-12-10T13:25:51.553965+00:00 app[web.1]: suppress_ragged_eofs: True
2018-12-10T13:25:51.553966+00:00 app[web.1]: do_handshake_on_connect: False
2018-12-10T13:25:51.553968+00:00 app[web.1]: ciphers: TLSv1
2018-12-10T13:25:51.553977+00:00 app[web.1]: raw_paste_global_conf: []
2018-12-10T13:25:51.554464+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [INFO] Starting gunicorn 19.9.0
2018-12-10T13:25:51.560899+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [DEBUG] Arbiter booted
2018-12-10T13:25:51.561173+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [INFO] Listening at: http://0.0.0.0:47277 (4)
2018-12-10T13:25:51.561349+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [INFO] Using worker: sync
2018-12-10T13:25:51.570108+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [10] [INFO] Booting worker with pid: 10
2018-12-10T13:25:51.610234+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [11] [INFO] Booting worker with pid: 11
2018-12-10T13:25:51.704389+00:00 app[web.1]: [2018-12-10 13:25:51 +0000] [4] [DEBUG] 2 workers
2018-12-10T13:25:52.856398+00:00 app[web.1]: [2018-12-10 22:25:52 +0900] [10] [ERROR] Exception in worker process
2018-12-10T13:25:52.856447+00:00 app[web.1]: Traceback (most recent call last):
2018-12-10T13:25:52.856450+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2018-12-10T13:25:52.856452+00:00 app[web.1]: worker.init_process()
2018-12-10T13:25:52.856453+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2018-12-10T13:25:52.856455+00:00 app[web.1]: self.load_wsgi()
2018-12-10T13:25:52.856456+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2018-12-10T13:25:52.856458+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-12-10T13:25:52.856459+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-12-10T13:25:52.856461+00:00 app[web.1]: self.callable = self.load()
2018-12-10T13:25:52.856463+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2018-12-10T13:25:52.856464+00:00 app[web.1]: return self.load_wsgiapp()
2018-12-10T13:25:52.856466+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2018-12-10T13:25:52.856467+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-12-10T13:25:52.856469+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2018-12-10T13:25:52.856470+00:00 app[web.1]: __import__(module)
2018-12-10T13:25:52.856473+00:00 app[web.1]: File "/app/djangoblog/wsgi.py", line 16, in <module>
2018-12-10T13:25:52.856474+00:00 app[web.1]: application = get_wsgi_application()
2018-12-10T13:25:52.856476+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2018-12-10T13:25:52.856477+00:00 app[web.1]: django.setup(set_prefix=False)
2018-12-10T13:25:52.856479+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
2018-12-10T13:25:52.856480+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)
2018-12-10T13:25:52.856482+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 89, in populate
2018-12-10T13:25:52.856483+00:00 app[web.1]: app_config = AppConfig.create(entry)
2018-12-10T13:25:52.856485+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
2018-12-10T13:25:52.856486+00:00 app[web.1]: module = import_module(entry)
2018-12-10T13:25:52.856488+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2018-12-10T13:25:52.856489+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2018-12-10T13:25:52.856497+00:00 app[web.1]: ModuleNotFoundError: No module named 'django_summernote'
2018-12-10T13:25:52.856514+00:00 app[web.1]: [2018-12-10 22:25:52 +0900] [11] [ERROR] Exception in worker process
2018-12-10T13:25:52.856516+00:00 app[web.1]: Traceback (most recent call last):
2018-12-10T13:25:52.856517+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2018-12-10T13:25:52.856519+00:00 app[web.1]: worker.init_process()
2018-12-10T13:25:52.856521+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2018-12-10T13:25:52.856522+00:00 app[web.1]: self.load_wsgi()
2018-12-10T13:25:52.856524+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2018-12-10T13:25:52.856525+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-12-10T13:25:52.856527+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2018-12-10T13:25:52.856528+00:00 app[web.1]: self.callable = self.load()
2018-12-10T13:25:52.856529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2018-12-10T13:25:52.856531+00:00 app[web.1]: return self.load_wsgiapp()
2018-12-10T13:25:52.856532+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2018-12-10T13:25:52.856534+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-12-10T13:25:52.856535+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2018-12-10T13:25:52.856536+00:00 app[web.1]: __import__(module)
2018-12-10T13:25:52.856538+00:00 app[web.1]: File "/app/djangoblog/wsgi.py", line 16, in <module>
2018-12-10T13:25:52.856539+00:00 app[web.1]: application = get_wsgi_application()
2018-12-10T13:25:52.856541+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2018-12-10T13:25:52.856542+00:00 app[web.1]: django.setup(set_prefix=False)
2018-12-10T13:25:52.856544+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
2018-12-10T13:25:52.856545+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)
2018-12-10T13:25:52.856546+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 89, in populate
2018-12-10T13:25:52.856548+00:00 app[web.1]: app_config = AppConfig.create(entry)
2018-12-10T13:25:52.856549+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
2018-12-10T13:25:52.856551+00:00 app[web.1]: module = import_module(entry)
2018-12-10T13:25:52.856552+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2018-12-10T13:25:52.856553+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2018-12-10T13:25:52.856590+00:00 app[web.1]: ModuleNotFoundError: No module named 'django_summernote'
2018-12-10T13:25:52.856988+00:00 app[web.1]: [2018-12-10 22:25:52 +0900] [10] [INFO] Worker exiting (pid: 10)
2018-12-10T13:25:52.857183+00:00 app[web.1]: [2018-12-10 22:25:52 +0900] [11] [INFO] Worker exiting (pid: 11)
2018-12-10T13:25:53.034230+00:00 app[web.1]: [2018-12-10 13:25:53 +0000] [4] [INFO] Shutting down: Master
2018-12-10T13:25:53.034673+00:00 app[web.1]: [2018-12-10 13:25:53 +0000] [4] [INFO] Reason: Worker failed to boot.
2018-12-10T13:25:52.898067+00:00 heroku[web.1]: State changed from starting to up
2018-12-10T13:25:53.175315+00:00 heroku[web.1]: Process exited with status 3
2018-12-10T13:25:53.196695+00:00 heroku[web.1]: State changed from up to crashed
Procfile
web: gunicorn djangoblog.wsgi:application --log-file - --log-level debug

This type of error occurs only when you declared the path in urls.py file but don’t declared the function in views.py file. Be sure you have followed these steps:
1. Register your app in setting.py file
2. Declared path in urls.py file (In project directry)
3. Declared path in urls.py file (In your app directry)
4.Declared the def (function) in views.py file

Related

Heroku Django crashed: at=error code=H10 desc=“App crashed” method=GET path=“/”

I am trying to deploy my Django project on Heroku.But everytime, I have got same error. Heroku restart doesnot work for me. I cleared buildpack and added python buildpack. This has not work for me. I also tried different host like ALLOWED_HOSTS = ['*', '127.0.0.1', 'dailynotes.herokuapp.com']. In Procfile I tried different way like web: gunicorn ToDoApps.wsgi: --log-file -
and
web: gunicorn ToDoApps.wsgi:application --log-file - --log-level debug
python manage.py collectstatic --noinput
manage.py migrate
This does not work for me.
crashed file
2021-08-18T09:37:39.832259+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dailynotes.herokuapp.com request_id=81cc172e-247e-4aa9-8b39-fb9440cd67d2 fwd="103.14.72.227" dyno= connect= service= status=503 bytes= protocol=https
2021-08-18T09:37:40.734680+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dailynotes.herokuapp.com request_id=8d2598b4-0521-4519-892a-467d2a2642ca fwd="103.14.72.227" dyno= connect= service= status=503 bytes= protocol=https
logs --tail
2021-08-18T09:21:46.641887+00:00 app[web.1]: preload_app: False
2021-08-18T09:21:46.641888+00:00 app[web.1]: sendfile: None
2021-08-18T09:21:46.641888+00:00 app[web.1]: reuse_port: False
2021-08-18T09:21:46.641888+00:00 app[web.1]: chdir: /app
2021-08-18T09:21:46.641889+00:00 app[web.1]: daemon: False
2021-08-18T09:21:46.641889+00:00 app[web.1]: raw_env: []
2021-08-18T09:21:46.641889+00:00 app[web.1]: pidfile: None
2021-08-18T09:21:46.641889+00:00 app[web.1]: worker_tmp_dir: None
2021-08-18T09:21:46.641890+00:00 app[web.1]: user: 9071
2021-08-18T09:21:46.641890+00:00 app[web.1]: group: 9071
2021-08-18T09:21:46.641890+00:00 app[web.1]: umask: 0
2021-08-18T09:21:46.641891+00:00 app[web.1]: initgroups: False
2021-08-18T09:21:46.641891+00:00 app[web.1]: tmp_upload_dir: None
2021-08-18T09:21:46.641909+00:00 app[web.1]: secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
2021-08-18T09:21:46.641909+00:00 app[web.1]: forwarded_allow_ips: ['*']
2021-08-18T09:21:46.641909+00:00 app[web.1]: accesslog: -
2021-08-18T09:21:46.641910+00:00 app[web.1]: disable_redirect_access_to_syslog: False
2021-08-18T09:21:46.641916+00:00 app[web.1]: access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
2021-08-18T09:21:46.641917+00:00 app[web.1]: errorlog: -
2021-08-18T09:21:46.641917+00:00 app[web.1]: loglevel: debug
2021-08-18T09:21:46.641918+00:00 app[web.1]: capture_output: False
2021-08-18T09:21:46.641918+00:00 app[web.1]: logger_class: gunicorn.glogging.Logger
2021-08-18T09:21:46.641918+00:00 app[web.1]: logconfig: None
2021-08-18T09:21:46.641919+00:00 app[web.1]: logconfig_dict: {}
2021-08-18T09:21:46.641919+00:00 app[web.1]: syslog_addr: udp://localhost:514
2021-08-18T09:21:46.641919+00:00 app[web.1]: syslog: False
2021-08-18T09:21:46.641920+00:00 app[web.1]: syslog_prefix: None
2021-08-18T09:21:46.641920+00:00 app[web.1]: syslog_facility: user
2021-08-18T09:21:46.641921+00:00 app[web.1]: enable_stdio_inheritance: False
2021-08-18T09:21:46.641921+00:00 app[web.1]: statsd_host: None
2021-08-18T09:21:46.641921+00:00 app[web.1]: dogstatsd_tags:
2021-08-18T09:21:46.641922+00:00 app[web.1]: statsd_prefix:
2021-08-18T09:21:46.641922+00:00 app[web.1]: proc_name: None
2021-08-18T09:21:46.641923+00:00 app[web.1]: default_proc_name: ToDoApps.wsgi:application
2021-08-18T09:21:46.641923+00:00 app[web.1]: pythonpath: None
2021-08-18T09:21:46.641923+00:00 app[web.1]: paste: None
2021-08-18T09:21:46.642453+00:00 app[web.1]: on_starting: <function OnStarting.on_starting at 0x7fef7fcbb9d0>
2021-08-18T09:21:46.642454+00:00 app[web.1]: on_reload: <function OnReload.on_reload at 0x7fef7fcbbaf0>
2021-08-18T09:21:46.642454+00:00 app[web.1]: when_ready: <function WhenReady.when_ready at 0x7fef7fcbbc10>
2021-08-18T09:21:46.642455+00:00 app[web.1]: pre_fork: <function Prefork.pre_fork at 0x7fef7fcbbd30>
2021-08-18T09:21:46.642455+00:00 app[web.1]: post_fork: <function Postfork.post_fork at 0x7fef7fcbbe50>
2021-08-18T09:21:46.642455+00:00 app[web.1]: post_worker_init: <function PostWorkerInit.post_worker_init at 0x7fef7fcbbf70>
2021-08-18T09:21:46.642456+00:00 app[web.1]: worker_int: <function WorkerInt.worker_int at 0x7fef7fccc0d0>
2021-08-18T09:21:46.642456+00:00 app[web.1]: worker_abort: <function WorkerAbort.worker_abort at 0x7fef7fccc1f0>
2021-08-18T09:21:46.642456+00:00 app[web.1]: pre_exec: <function PreExec.pre_exec at 0x7fef7fccc310>
2021-08-18T09:21:46.642457+00:00 app[web.1]: pre_request: <function PreRequest.pre_request at 0x7fef7fccc430>
2021-08-18T09:21:46.642457+00:00 app[web.1]: post_request: <function PostRequest.post_request at 0x7fef7fccc4c0>
2021-08-18T09:21:46.642458+00:00 app[web.1]: child_exit: <function ChildExit.child_exit at 0x7fef7fccc5e0>
2021-08-18T09:21:46.642458+00:00 app[web.1]: worker_exit: <function WorkerExit.worker_exit at 0x7fef7fccc700>
2021-08-18T09:21:46.642458+00:00 app[web.1]: nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7fef7fccc820>
2021-08-18T09:21:46.642459+00:00 app[web.1]: on_exit: <function OnExit.on_exit at 0x7fef7fccc940>
2021-08-18T09:21:46.642459+00:00 app[web.1]: proxy_protocol: False
2021-08-18T09:21:46.642459+00:00 app[web.1]: proxy_allow_ips: ['127.0.0.1']
2021-08-18T09:21:46.642460+00:00 app[web.1]: keyfile: None
2021-08-18T09:21:46.642460+00:00 app[web.1]: certfile: None
2021-08-18T09:21:46.642460+00:00 app[web.1]: ssl_version: 2
2021-08-18T09:21:46.642461+00:00 app[web.1]: cert_reqs: 0
2021-08-18T09:21:46.642461+00:00 app[web.1]: ca_certs: None
2021-08-18T09:21:46.642461+00:00 app[web.1]: suppress_ragged_eofs: True
2021-08-18T09:21:46.642462+00:00 app[web.1]: do_handshake_on_connect: False
2021-08-18T09:21:46.642462+00:00 app[web.1]: ciphers: None
2021-08-18T09:21:46.642462+00:00 app[web.1]: raw_paste_global_conf: []
2021-08-18T09:21:46.642463+00:00 app[web.1]: strip_header_spaces: False
2021-08-18T09:21:46.643622+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-08-18T09:21:46.644633+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [DEBUG] Arbiter booted
2021-08-18T09:21:46.644821+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Listening at: http://0.0.0.0:44920 (4)
2021-08-18T09:21:46.645051+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Using worker: sync
2021-08-18T09:21:46.652069+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [INFO] Booting worker with pid: 7
2021-08-18T09:21:46.662712+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [ERROR] Exception in worker process
2021-08-18T09:21:46.662715+00:00 app[web.1]: Traceback (most recent call last):
2021-08-18T09:21:46.662715+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-08-18T09:21:46.662716+00:00 app[web.1]: worker.init_process()
2021-08-18T09:21:46.662716+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-08-18T09:21:46.662717+00:00 app[web.1]: self.load_wsgi()
2021-08-18T09:21:46.662717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-08-18T09:21:46.662718+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-08-18T09:21:46.662718+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-08-18T09:21:46.662718+00:00 app[web.1]: self.callable = self.load()
2021-08-18T09:21:46.662719+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-08-18T09:21:46.662719+00:00 app[web.1]: return self.load_wsgiapp()
2021-08-18T09:21:46.662719+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-08-18T09:21:46.662720+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-08-18T09:21:46.662720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-08-18T09:21:46.662720+00:00 app[web.1]: mod = importlib.import_module(module)
2021-08-18T09:21:46.662721+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-08-18T09:21:46.662721+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-08-18T09:21:46.662722+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-08-18T09:21:46.662722+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 850, in exec_module
2021-08-18T09:21:46.662724+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2021-08-18T09:21:46.662724+00:00 app[web.1]: File "/app/ToDoApps/wsgi.py", line 12, in <module>
2021-08-18T09:21:46.662725+00:00 app[web.1]: from django.core.wsgi import get_wsgi_application
2021-08-18T09:21:46.662725+00:00 app[web.1]: ModuleNotFoundError: No module named 'django'
2021-08-18T09:21:46.662924+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-08-18T09:21:46.707594+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Shutting down: Master
2021-08-18T09:21:46.707848+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-08-18T09:21:46.836081+00:00 heroku[web.1]: Process exited with status 3
2021-08-18T09:21:47.118125+00:00 heroku[web.1]: State changed from starting to crashed
2021-08-18T09:21:46.641887+00:00 app[web.1]: preload_app: False
2021-08-18T09:21:46.641888+00:00 app[web.1]: sendfile: None
2021-08-18T09:21:46.641888+00:00 app[web.1]: reuse_port: False
2021-08-18T09:21:46.641888+00:00 app[web.1]: chdir: /app
2021-08-18T09:21:46.641889+00:00 app[web.1]: daemon: False
2021-08-18T09:21:46.641889+00:00 app[web.1]: raw_env: []
2021-08-18T09:21:46.641889+00:00 app[web.1]: pidfile: None
2021-08-18T09:21:46.641889+00:00 app[web.1]: worker_tmp_dir: None
2021-08-18T09:21:46.641890+00:00 app[web.1]: user: 9071
2021-08-18T09:21:46.641890+00:00 app[web.1]: group: 9071
2021-08-18T09:21:46.641890+00:00 app[web.1]: umask: 0
2021-08-18T09:21:46.641891+00:00 app[web.1]: initgroups: False
2021-08-18T09:21:46.641891+00:00 app[web.1]: tmp_upload_dir: None
2021-08-18T09:21:46.641909+00:00 app[web.1]: secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
2021-08-18T09:21:46.641909+00:00 app[web.1]: forwarded_allow_ips: ['*']
2021-08-18T09:21:46.641909+00:00 app[web.1]: accesslog: -
2021-08-18T09:21:46.641910+00:00 app[web.1]: disable_redirect_access_to_syslog: False
2021-08-18T09:21:46.641916+00:00 app[web.1]: access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
2021-08-18T09:21:46.641917+00:00 app[web.1]: errorlog: -
2021-08-18T09:21:46.641917+00:00 app[web.1]: loglevel: debug
2021-08-18T09:21:46.641918+00:00 app[web.1]: capture_output: False
2021-08-18T09:21:46.641918+00:00 app[web.1]: logger_class: gunicorn.glogging.Logger
2021-08-18T09:21:46.641918+00:00 app[web.1]: logconfig: None
2021-08-18T09:21:46.641919+00:00 app[web.1]: logconfig_dict: {}
2021-08-18T09:21:46.641919+00:00 app[web.1]: syslog_addr: udp://localhost:514
2021-08-18T09:21:46.641919+00:00 app[web.1]: syslog: False
2021-08-18T09:21:46.641920+00:00 app[web.1]: syslog_prefix: None
2021-08-18T09:21:46.641920+00:00 app[web.1]: syslog_facility: user
2021-08-18T09:21:46.641921+00:00 app[web.1]: enable_stdio_inheritance: False
2021-08-18T09:21:46.641921+00:00 app[web.1]: statsd_host: None
2021-08-18T09:21:46.641921+00:00 app[web.1]: dogstatsd_tags:
2021-08-18T09:21:46.641922+00:00 app[web.1]: statsd_prefix:
2021-08-18T09:21:46.641922+00:00 app[web.1]: proc_name: None
2021-08-18T09:21:46.641923+00:00 app[web.1]: default_proc_name: ToDoApps.wsgi:application
2021-08-18T09:21:46.641923+00:00 app[web.1]: pythonpath: None
2021-08-18T09:21:46.641923+00:00 app[web.1]: paste: None
2021-08-18T09:21:46.642453+00:00 app[web.1]: on_starting: <function OnStarting.on_starting at 0x7fef7fcbb9d0>
2021-08-18T09:21:46.642454+00:00 app[web.1]: on_reload: <function OnReload.on_reload at 0x7fef7fcbbaf0>
2021-08-18T09:21:46.642454+00:00 app[web.1]: when_ready: <function WhenReady.when_ready at 0x7fef7fcbbc10>
2021-08-18T09:21:46.642455+00:00 app[web.1]: pre_fork: <function Prefork.pre_fork at 0x7fef7fcbbd30>
2021-08-18T09:21:46.642455+00:00 app[web.1]: post_fork: <function Postfork.post_fork at 0x7fef7fcbbe50>
2021-08-18T09:21:46.642455+00:00 app[web.1]: post_worker_init: <function PostWorkerInit.post_worker_init at 0x7fef7fcbbf70>
2021-08-18T09:21:46.642456+00:00 app[web.1]: worker_int: <function WorkerInt.worker_int at 0x7fef7fccc0d0>
2021-08-18T09:21:46.642456+00:00 app[web.1]: worker_abort: <function WorkerAbort.worker_abort at 0x7fef7fccc1f0>
2021-08-18T09:21:46.642456+00:00 app[web.1]: pre_exec: <function PreExec.pre_exec at 0x7fef7fccc310>
2021-08-18T09:21:46.642457+00:00 app[web.1]: pre_request: <function PreRequest.pre_request at 0x7fef7fccc430>
2021-08-18T09:21:46.642457+00:00 app[web.1]: post_request: <function PostRequest.post_request at 0x7fef7fccc4c0>
2021-08-18T09:21:46.642458+00:00 app[web.1]: child_exit: <function ChildExit.child_exit at 0x7fef7fccc5e0>
2021-08-18T09:21:46.642458+00:00 app[web.1]: worker_exit: <function WorkerExit.worker_exit at 0x7fef7fccc700>
2021-08-18T09:21:46.642458+00:00 app[web.1]: nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7fef7fccc820>
2021-08-18T09:21:46.642459+00:00 app[web.1]: on_exit: <function OnExit.on_exit at 0x7fef7fccc940>
2021-08-18T09:21:46.642459+00:00 app[web.1]: proxy_protocol: False
2021-08-18T09:21:46.642459+00:00 app[web.1]: proxy_allow_ips: ['127.0.0.1']
2021-08-18T09:21:46.642460+00:00 app[web.1]: keyfile: None
2021-08-18T09:21:46.642460+00:00 app[web.1]: certfile: None
2021-08-18T09:21:46.642460+00:00 app[web.1]: ssl_version: 2
2021-08-18T09:21:46.642461+00:00 app[web.1]: cert_reqs: 0
2021-08-18T09:21:46.642461+00:00 app[web.1]: ca_certs: None
2021-08-18T09:21:46.642461+00:00 app[web.1]: suppress_ragged_eofs: True
2021-08-18T09:21:46.642462+00:00 app[web.1]: do_handshake_on_connect: False
2021-08-18T09:21:46.642462+00:00 app[web.1]: ciphers: None
2021-08-18T09:21:46.642462+00:00 app[web.1]: raw_paste_global_conf: []
2021-08-18T09:21:46.642463+00:00 app[web.1]: strip_header_spaces: False
2021-08-18T09:21:46.643622+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-08-18T09:21:46.644633+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [DEBUG] Arbiter booted
2021-08-18T09:21:46.644821+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Listening at: http://0.0.0.0:44920 (4)
2021-08-18T09:21:46.645051+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Using worker: sync
2021-08-18T09:21:46.652069+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [INFO] Booting worker with pid: 7
2021-08-18T09:21:46.662712+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [ERROR] Exception in worker process
2021-08-18T09:21:46.662715+00:00 app[web.1]: Traceback (most recent call last):
2021-08-18T09:21:46.662715+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-08-18T09:21:46.662716+00:00 app[web.1]: worker.init_process()
2021-08-18T09:21:46.662716+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-08-18T09:21:46.662717+00:00 app[web.1]: self.load_wsgi()
2021-08-18T09:21:46.662717+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-08-18T09:21:46.662718+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-08-18T09:21:46.662718+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-08-18T09:21:46.662718+00:00 app[web.1]: self.callable = self.load()
2021-08-18T09:21:46.662719+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-08-18T09:21:46.662719+00:00 app[web.1]: return self.load_wsgiapp()
2021-08-18T09:21:46.662719+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-08-18T09:21:46.662720+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-08-18T09:21:46.662720+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-08-18T09:21:46.662720+00:00 app[web.1]: mod = importlib.import_module(module)
2021-08-18T09:21:46.662721+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-08-18T09:21:46.662721+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-08-18T09:21:46.662722+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-08-18T09:21:46.662722+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2021-08-18T09:21:46.662723+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 850, in exec_module
2021-08-18T09:21:46.662724+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2021-08-18T09:21:46.662724+00:00 app[web.1]: File "/app/ToDoApps/wsgi.py", line 12, in <module>
2021-08-18T09:21:46.662725+00:00 app[web.1]: from django.core.wsgi import get_wsgi_application
2021-08-18T09:21:46.662725+00:00 app[web.1]: ModuleNotFoundError: No module named 'django'
2021-08-18T09:21:46.662924+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-08-18T09:21:46.707594+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Shutting down: Master
2021-08-18T09:21:46.707848+00:00 app[web.1]: [2021-08-18 09:21:46 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-08-18T09:21:46.836081+00:00 heroku[web.1]: Process exited with status 3
2021-08-18T09:21:47.118125+00:00 heroku[web.1]: State changed from starting to crashed
Procfile
web: gunicorn ToDoApps.wsgi
settings.py
from pathlib import Path
import os
import dj_database_url
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-z913vx8_t5o#ahodt51t37t4-*9ytn3k*#zi%)lcl26wq=v2k3'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['*'] #new
# Application definition
INSTALLED_APPS = [
'whitenoise.runserver_nostatic', #New
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
#'whitenoise.runserver_nostatic',#New
'django.contrib.staticfiles',
'second',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware', #new
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'ToDoApps.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'ToDoApps.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
WHITENOISE_USE_FINDERS = True #New
# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.2/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') #New!
STATIC_URL = '/static/'
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' #new!
#New start
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
#New End
It works after few changes. I missed to run python3 manage.py collectstatic . Then pushing to github. I removed buildpacks before deploying. and followed this tutorial https://www.codechit.com/django-github-auto-deployment-to-heroku/

heroku app successfully deployed but showing application error

heroku logs --tail --app fooodie-bot2021
» Warning: heroku update available from 7.53.0 to 7.54.0.
2021-06-04T18:44:13.667090+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:58344 app:app`
2021-06-04T18:44:17.360140+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T18:44:17.360928+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Listening at: http://0.0.0.0:58344 (4)
2021-06-04T18:44:17.361067+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Using worker: sync
2021-06-04T18:44:17.367156+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T18:44:17.375131+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [ERROR] Exception in worker process
2021-06-04T18:44:17.375145+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T18:44:17.375147+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T18:44:17.375148+00:00 app[web.1]: worker.init_process()
2021-06-04T18:44:17.375149+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-06-04T18:44:17.375149+00:00 app[web.1]: self.load_wsgi()
2021-06-04T18:44:17.375149+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T18:44:17.375150+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T18:44:17.375151+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T18:44:17.375152+00:00 app[web.1]: self.callable = self.load()
2021-06-04T18:44:17.375152+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T18:44:17.375152+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T18:44:17.375153+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T18:44:17.375153+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T18:44:17.375154+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T18:44:17.375154+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T18:44:17.375154+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T18:44:17.375155+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T18:44:17.375155+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T18:44:17.375156+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T18:44:17.375156+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T18:44:17.375156+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T18:44:17.375384+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T18:44:17.435219+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Shutting down: Master
2021-06-04T18:44:17.435220+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T18:44:17.529984+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T18:44:17.603954+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-04T20:52:46.691043+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-04T20:52:53.880135+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:32290 app:app`
2021-06-04T20:52:57.015064+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T20:52:57.015457+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Listening at: http://0.0.0.0:32290 (4)
2021-06-04T20:52:57.015537+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Using worker: sync
2021-06-04T20:52:57.019297+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T20:52:57.025214+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [ERROR] Exception in worker process
2021-06-04T20:52:57.025215+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T20:52:57.025216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T20:52:57.025216+00:00 app[web.1]: worker.init_process()
2021-06-04T20:52:57.025217+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-06-04T20:52:57.025217+00:00 app[web.1]: self.load_wsgi()
2021-06-04T20:52:57.025217+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T20:52:57.025218+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T20:52:57.025218+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T20:52:57.025219+00:00 app[web.1]: self.callable = self.load()
2021-06-04T20:52:57.025219+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T20:52:57.025219+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T20:52:57.025220+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T20:52:57.025220+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T20:52:57.025220+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T20:52:57.025221+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T20:52:57.025221+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T20:52:57.025222+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T20:52:57.025222+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T20:52:57.025222+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T20:52:57.025223+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T20:52:57.025223+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T20:52:57.025357+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T20:52:57.060273+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Shutting down: Master
2021-06-04T20:52:57.060339+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T20:52:57.136841+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T20:52:57.214462+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-04T23:56:33.244581+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-04T23:56:41.153062+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:44202 app:app`
2021-06-04T23:56:45.069131+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T23:56:45.069673+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Listening at: http://0.0.0.0:44202 (4)
2021-06-04T23:56:45.069777+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Using worker: sync
2021-06-04T23:56:45.073690+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T23:56:45.078553+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [ERROR] Exception in worker process
2021-06-04T23:56:45.078582+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T23:56:45.078588+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T23:56:45.078594+00:00 app[web.1]: worker.init_process()
2021-06-04T23:56:45.078594+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-06-04T23:56:45.078595+00:00 app[web.1]: self.load_wsgi()
2021-06-04T23:56:45.078595+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T23:56:45.078595+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T23:56:45.078600+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T23:56:45.078601+00:00 app[web.1]: self.callable = self.load()
2021-06-04T23:56:45.078601+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T23:56:45.078601+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T23:56:45.078602+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T23:56:45.078602+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T23:56:45.078602+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T23:56:45.078603+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T23:56:45.078603+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T23:56:45.078604+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T23:56:45.078604+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T23:56:45.078605+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T23:56:45.078605+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T23:56:45.078605+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T23:56:45.078700+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T23:56:45.117467+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Shutting down: Master
2021-06-04T23:56:45.117651+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T23:56:45.231963+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T23:56:45.388008+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-05T03:47:07.088448+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fooodie-bot2021.herokuapp.com request_id=aa2aa16a-bb5f-44d6-a6ea-4083e463693f fwd="42.106.107.86" dyno= connect= service= status=503 bytes= protocol=https
2021-06-05T03:47:07.663226+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fooodie-bot2021.herokuapp.com request_id=4e065a27-291a-4498-b690-f70f0df250cc fwd="42.106.107.86" dyno= connect= service= status=503 bytes= protocol=https
Error says there is no module named app, please check if your python file is named app and has Flask instance equal to app.

ModuleNotFoundError: No module named 'mysite.wsgi' error comes up during deployment

I was making a Django web app using pipenv, the Application error window pops up whenever i try running 'heroku open', please help i am stuck in deploying this for over one month and have tried almost every possible solution that was available online but the error still persists. please help.
Running'heroku logs --tail' shows:
$ heroku logs --tail
2021-02-17T17:50:51.188410+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2021-02-17T17:50:51.297606+00:00 heroku[web.1]: Process exited with status 1
2021-02-17T17:50:51.389796+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-17T17:50:53.000000+00:00 app[api]: Build succeeded
2021-02-17T17:51:39.619675+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bloggero.herokuapp.com request_id=ecbd78a2-5542-4d08-87f7-e7d12404ae9b fwd="223.239.61.176" dyno= connect= service= status=503 bytes= protocol=https
2021-02-17T17:51:41.855171+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=bloggero.herokuapp.com request_id=42dd37d3-ad4b-43dc-956d-41d34bf03ffd fwd="223.239.61.176" dyno= connect= service= status=503 bytes= protocol=https
2021-02-17T18:04:58.000000+00:00 app[api]: Build started by user ad******#gmail.com
2021-02-17T18:05:29.716771+00:00 app[api]: Deploy 879be0de by user a******#gmail.com
2021-02-17T18:05:29.716771+00:00 app[api]: Release v19 created by user a*******#gmail.com
2021-02-17T18:05:30.074089+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-17T18:05:35.396728+00:00 heroku[web.1]: Starting process with command `gunicorn mysite.wsgi`
2021-02-17T18:05:37.756029+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [4] [INFO] Starting gunicorn 20.0.4
2021-02-17T18:05:37.756584+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [4] [INFO] Listening at: http://0.0.0.0:17786 (4)
2021-02-17T18:05:37.756675+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [4] [INFO] Using worker: sync
2021-02-17T18:05:37.761624+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [9] [INFO] Booting worker with pid: 9
2021-02-17T18:05:37.770211+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [9] [ERROR] Exception in worker process
2021-02-17T18:05:37.770213+00:00 app[web.1]: Traceback (most recent call last):
2021-02-17T18:05:37.770232+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-02-17T18:05:37.770233+00:00 app[web.1]: worker.init_process()
2021-02-17T18:05:37.770234+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-02-17T18:05:37.770234+00:00 app[web.1]: self.load_wsgi()
2021-02-17T18:05:37.770234+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-02-17T18:05:37.770235+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-02-17T18:05:37.770235+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-02-17T18:05:37.770236+00:00 app[web.1]: self.callable = self.load()
2021-02-17T18:05:37.770236+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-02-17T18:05:37.770236+00:00 app[web.1]: return self.load_wsgiapp()
2021-02-17T18:05:37.770237+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-02-17T18:05:37.770237+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-02-17T18:05:37.770238+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
2021-02-17T18:05:37.770238+00:00 app[web.1]: mod = importlib.import_module(module)
2021-02-17T18:05:37.770238+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2021-02-17T18:05:37.770239+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-02-17T18:05:37.770239+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2021-02-17T18:05:37.770240+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2021-02-17T18:05:37.770240+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
2021-02-17T18:05:37.770240+00:00 app[web.1]: ModuleNotFoundError: No module named 'mysite.wsgi'
2021-02-17T18:05:37.770465+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-02-17T18:05:37.779801+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [10] [INFO] Booting worker with pid: 10
2021-02-17T18:05:37.785931+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [10] [ERROR] Exception in worker process
2021-02-17T18:05:37.785933+00:00 app[web.1]: Traceback (most recent call last):
2021-02-17T18:05:37.785934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-02-17T18:05:37.785934+00:00 app[web.1]: worker.init_process()
2021-02-17T18:05:37.785934+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-02-17T18:05:37.785935+00:00 app[web.1]: self.load_wsgi()
2021-02-17T18:05:37.785935+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-02-17T18:05:37.785936+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-02-17T18:05:37.785937+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-02-17T18:05:37.785937+00:00 app[web.1]: self.callable = self.load()
2021-02-17T18:05:37.785937+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-02-17T18:05:37.785938+00:00 app[web.1]: return self.load_wsgiapp()
2021-02-17T18:05:37.785938+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-02-17T18:05:37.785939+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-02-17T18:05:37.785939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
2021-02-17T18:05:37.785939+00:00 app[web.1]: mod = importlib.import_module(module)
2021-02-17T18:05:37.785940+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2021-02-17T18:05:37.785940+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-02-17T18:05:37.785941+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2021-02-17T18:05:37.785941+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2021-02-17T18:05:37.785941+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
2021-02-17T18:05:37.785942+00:00 app[web.1]: ModuleNotFoundError: No module named 'mysite.wsgi'
2021-02-17T18:05:37.786104+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [10] [INFO] Worker exiting (pid: 10)
2021-02-17T18:05:37.906870+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [4] [INFO] Shutting down: Master
2021-02-17T18:05:37.906946+00:00 app[web.1]: [2021-02-17 18:05:37 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-02-17T18:05:37.987061+00:00 heroku[web.1]: Process exited with status 3
2021-02-17T18:05:38.059333+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-17T18:05:38.062623+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-17T18:05:41.000000+00:00 app[api]: Build succeeded
2021-02-17T18:05:48.981104+00:00 heroku[web.1]: Starting process with command `gunicorn mysite.wsgi`
2021-02-17T18:05:52.073363+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [4] [INFO] Starting gunicorn 20.0.4
2021-02-17T18:05:52.074407+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [4] [INFO] Listening at: http://0.0.0.0:45799 (4)
2021-02-17T18:05:52.074661+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [4] [INFO] Using worker: sync
2021-02-17T18:05:52.082772+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [9] [INFO] Booting worker with pid: 9
2021-02-17T18:05:52.096292+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [9] [ERROR] Exception in worker process
2021-02-17T18:05:52.096293+00:00 app[web.1]: Traceback (most recent call last):
2021-02-17T18:05:52.096302+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2021-02-17T18:05:52.096303+00:00 app[web.1]: worker.init_process()
2021-02-17T18:05:52.096303+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
2021-02-17T18:05:52.096303+00:00 app[web.1]: self.load_wsgi()
2021-02-17T18:05:52.096304+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2021-02-17T18:05:52.096304+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-02-17T18:05:52.096304+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-02-17T18:05:52.096305+00:00 app[web.1]: self.callable = self.load()
2021-02-17T18:05:52.096305+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2021-02-17T18:05:52.096306+00:00 app[web.1]: return self.load_wsgiapp()
2021-02-17T18:05:52.096306+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2021-02-17T18:05:52.096306+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-02-17T18:05:52.096307+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
2021-02-17T18:05:52.096307+00:00 app[web.1]: mod = importlib.import_module(module)
2021-02-17T18:05:52.096307+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2021-02-17T18:05:52.096308+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-02-17T18:05:52.096308+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2021-02-17T18:05:52.096309+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2021-02-17T18:05:52.096309+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
2021-02-17T18:05:52.096310+00:00 app[web.1]: ModuleNotFoundError: No module named 'mysite.wsgi'
2021-02-17T18:05:52.096657+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-02-17T18:05:52.131656+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [4] [INFO] Shutting down: Master
2021-02-17T18:05:52.131783+00:00 app[web.1]: [2021-02-17 18:05:52 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-02-17T18:05:52.238783+00:00 heroku[web.1]: Process exited with status 3
2021-02-17T18:05:52.335630+00:00 heroku[web.1]: State changed from starting to crashed
I checked the Procfile and it looks :
web: gunicorn mysite.wsgi
And here is the wsgi.py module:
from helloworld.wsgi import HelloWorldApplication
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
application = get_wsgi_application()
application = HelloWorldApplication(application)
The project structure is as follows-
And i have already installed gunicorn and other requirements which can be seen here in the pipfile:-
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
asgiref = "==3.2.10"
django-crispy-forms = "==1.10.0"
pytz = "==2020.4"
sqlparse = "==0.4.1"
Django = "==3.1"
Pillow = "==8.0.1"
gunicorn = "*"
[requires]
python_version = "3.7"
From a quick google search I found another thread with a similar question. The answers seem to indicate that you need to add your project directory in your python path.
First, import the sys module.
import sys
Now, right before the os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') line, add:
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if path not in sys.path:
sys.path.append(path)
This code snippet grabs the absolute path to your project directory and appends it to your python path if it is not already there.
Also, I second Field Boy's response that you should consider a linux server.
Please don't waste your time with heroku, you will always run into problems, even after your app started fine, if your app is fairly large. Use a virtual machine (check digital ocean or linode they have free $100 credit) and your app will run just like on your laptop. Look for Corey Schafer Django deployment on linux server on youtube on how to set up Apache2 virtual server on the linux server.

ImportError: Failed to find application Heroku Django

I'm trying to deploy my app on heroku.Im folowing the tutorial given here But i keep getting this error:
[2016-07-19 20:12:52 +0000] [9] [ERROR] Exception in worker process
2016-07-19T20:12:52.439226+00:00 app[web.1]: Traceback (most recent call last):
2016-07-19T20:12:52.439230+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
2016-07-19T20:12:52.374824+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [3] [INFO] Starting gunicorn 19.6.0
2016-07-19T20:12:52.439228+00:00 app[web.1]: worker.init_process()
2016-07-19T20:12:52.439228+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
2016-07-19T20:12:52.439229+00:00 app[web.1]: self.load_wsgi()
2016-07-19T20:12:52.424899+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [3] [INFO] Listening at: http://0.0.0.0:38254 (3)
2016-07-19T20:12:52.435017+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [9] [INFO] Booting worker with pid: 9
2016-07-19T20:12:52.425028+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [3] [INFO] Using worker: sync
2016-07-19T20:12:52.439227+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
2016-07-19T20:12:52.439248+00:00 app[web.1]: self.callable = self.load()
2016-07-19T20:12:52.450973+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-07-19T20:12:52.439250+00:00 app[web.1]: return self.load_wsgiapp()
2016-07-19T20:12:52.439252+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 361, in import_app
2016-07-19T20:12:52.450970+00:00 app[web.1]: worker.init_process()
2016-07-19T20:12:52.439249+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-07-19T20:12:52.439231+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-07-19T20:12:52.439254+00:00 app[web.1]: ImportError: Failed to find application, did you mean '/app/redcross/redcross/wsgi:application'?
2016-07-19T20:12:52.439248+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-07-19T20:12:52.448577+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [10] [INFO] Booting worker with pid: 10
2016-07-19T20:12:52.450977+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-07-19T20:12:52.450978+00:00 app[web.1]: raise ImportError(msg % (module.rsplit(".", 1)[0], obj))
2016-07-19T20:12:52.450971+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
2016-07-19T20:12:52.450969+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
2016-07-19T20:12:52.439251+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-07-19T20:12:52.439253+00:00 app[web.1]: raise ImportError(msg % (module.rsplit(".", 1)[0], obj))
2016-07-19T20:12:52.450971+00:00 app[web.1]: self.load_wsgi()
2016-07-19T20:12:52.445788+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [9] [INFO] Worker exiting (pid: 9)
2016-07-19T20:12:52.439251+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-07-19T20:12:52.450973+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-07-19T20:12:52.450976+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-07-19T20:12:52.450977+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 361, in import_app
2016-07-19T20:12:52.450958+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [10] [ERROR] Exception in worker process
2016-07-19T20:12:52.450972+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
2016-07-19T20:12:52.450975+00:00 app[web.1]: return self.load_wsgiapp()
2016-07-19T20:12:52.450979+00:00 app[web.1]: ImportError: Failed to find application, did you mean '/app/redcross/redcross/wsgi:application'?
2016-07-19T20:12:52.450968+00:00 app[web.1]: Traceback (most recent call last):
2016-07-19T20:12:52.450975+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-07-19T20:12:52.708960+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [3] [INFO] Shutting down: Master
2016-07-19T20:12:52.709298+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [3] [INFO] Reason: Worker failed to boot.
2016-07-19T20:12:52.450974+00:00 app[web.1]: self.callable = self.load()
2016-07-19T20:12:52.451099+00:00 app[web.1]: [2016-07-19 20:12:52 +0000] [10] [INFO] Worker exiting (pid: 10)
2016-07-19T20:12:54.339128+00:00 heroku[web.1]: Process exited with status 3
2016-07-19T20:12:54.359632+00:00 heroku[web.1]: State changed from starting to crashed
Procfile:
web: python manage.py runserver
web: gunicorn $WSGI_PATH:application --log-file -
heroku ps:scale web=1
My directory Structure:
My procfile is in outermost directory along-with requirements.txt while wsgi.py is in outermost_folder/app_name/app_name/wsgi.py
Got it to work by explicitly providing path to wsgi application using --pythonpath
web: python manage.py runserver
web: gunicorn --pythonpath path_wsgi_application --log-file -
heroku ps:scale web=1

Getting application error after serving Django on Herohu, 'module' object has no attribute Cling

I have Been using this guide Getting Started with Django on Heroku
requirements.txt
dj-database-url==0.3.0
dj-static==0.0.6
Django==1.7.7
django-toolbelt==0.0.1
djrill==1.3.0
gunicorn==19.3.0
Pillow==2.7.0
psycopg2==2.6
requests==2.6.0
static3==0.5.1
Procfile
web: gunicorn MY_DJANGO_APP.wsgi --log-file -
wsgi.py
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MY_DJANGO_APP.settings")
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
application = Cling(get_wsgi_application())
Heroku log
State changed from crashed to starting
heroku[web.1]: Starting process with command `gunicorn MY_Django_App.wsgi --log-file -`
app[web.1]: [2015-03-29 07:17:55 +0000] [3] [INFO] Starting gunicorn 19.3.0
app[web.1]: [2015-03-29 07:17:56 +0000] [8] [INFO] Booting worker with pid: 8
app[web.1]: [2015-03-29 07:17:55 +0000] [3] [INFO] Listening at: http://0.0.0.0:17329 (3)
app[web.1]: [2015-03-29 07:17:55 +0000] [3] [INFO] Using worker: sync
app[web.1]: [2015-03-29 07:17:55 +0000] [7] [INFO] Booting worker with pid: 7
heroku[web.1]: State changed from starting to up
app[web.1]: [2015-03-29 07:17:56 +0000] [8] [ERROR] Exception in worker process:
app[web.1]: self.callable = self.load()
app[web.1]: return util.import_app(self.app_uri)
app[web.1]: File "/app/MY_Django_App/wsgi.py", line 17, in <module>
app[web.1]: Traceback (most recent call last):
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/workers/base.py", line 118, in init_process
app[web.1]: Traceback (most recent call last):
app[web.1]: worker.init_process()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/workers/base.py", line 118, in init_process
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/dj_static.py", line 48, in __init__
app[web.1]: AttributeError: 'module' object has no attribute 'Cling'
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
app[web.1]: return self.load_wsgiapp()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/dj_static.py", line 48, in __init__
app[web.1]: self.wsgi = self.app.wsgi()
app[web.1]: return self.load_wsgiapp()
app[web.1]: __import__(module)
app[web.1]: application = Cling(get_wsgi_application())
app[web.1]: AttributeError: 'module' object has no attribute 'Cling'
app[web.1]: application = Cling(get_wsgi_application())
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/base.py", line 67, in wsgi
app[web.1]: return util.import_app(self.app_uri)
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/util.py", line 355, in import_app
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
app[web.1]: self.wsgi = self.app.wsgi()
app[web.1]: __import__(module)
app[web.1]: self.cling = static.Cling(base_dir)
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
app[web.1]: [2015-03-29 07:17:56 +0000] [8] [INFO] Worker exiting (pid: 8)
app[web.1]: worker.init_process()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/base.py", line 67, in wsgi
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
app[web.1]: self.callable = self.load()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/util.py", line 355, in import_app
app[web.1]: File "/app/MY_Django_App/wsgi.py", line 17, in <module>
app[web.1]: self.cling = static.Cling(base_dir)
app[web.1]: [2015-03-29 07:17:56 +0000] [7] [ERROR] Exception in worker process:
app[web.1]: worker.init_process()
app[web.1]: return self.load_wsgiapp()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/dj_static.py", line 48, in __init__
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/util.py", line 355, in import_app
app[web.1]: File "/app/MY_Django_App/wsgi.py", line 17, in <module>
app[web.1]: Traceback (most recent call last):
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/workers/base.py", line 118, in init_process
app[web.1]: __import__(module)
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
app[web.1]: __import__(module)
app[web.1]: self.cling = static.Cling(base_dir)
app[web.1]: return self.load_wsgiapp()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/base.py", line 67, in wsgi
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/util.py", line 355, in import_app
app[web.1]: worker.init_process()
app[web.1]: self.callable = self.load()
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
app[web.1]: AttributeError: 'module' object has no attribute 'Cling'
app[web.1]: [2015-03-29 07:17:56 +0000] [3] [INFO] Shutting down: Master
app[web.1]: [2015-03-29 07:17:56 +0000] [3] [INFO] Reason: Worker failed to boot.
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/base.py", line 67, in wsgi
app[web.1]: self.cling = static.Cling(base_dir)
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
app[web.1]: File "/app/MY_Django_App/wsgi.py", line 17, in <module>
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/workers/base.py", line 118, in init_process
app[web.1]: self.callable = self.load()
app[web.1]: AttributeError: 'module' object has no attribute 'Cling'
app[web.1]: return util.import_app(self.app_uri)
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/dj_static.py", line 48, in __init__
app[web.1]: self.wsgi = self.app.wsgi()
app[web.1]: return util.import_app(self.app_uri)
app[web.1]: Traceback (most recent call last):
app[web.1]: File "/app/.heroku/python/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
app[web.1]: application = Cling(get_wsgi_application())
app[web.1]: application = Cling(get_wsgi_application())
app[web.1]: self.wsgi = self.app.wsgi()
app[web.1]: [2015-03-29 07:17:56 +0000] [7] [INFO] Worker exiting (pid: 7)
heroku[web.1]: State changed from up to crashed
heroku[web.1]: Process exited with status 3
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/feed" host=MY_Django_App.herokuapp.com request_id=e6de6503-58ea-4a05-b8fc-20321ace144a fwd="91.133.185.43" dyno=web.1 connect=5000ms service= status=503 bytes=
The more eye catching error
app[web.1]: self.wsgi = self.app.wsgi()
app[web.1]: return self.load_wsgiapp()
app[web.1]: __import__(module)
app[web.1]: application = Cling(get_wsgi_application())
app[web.1]: AttributeError: 'module' object has no attribute 'Cling'
app[web.1]: application = Cling(get_wsgi_application())
What should I do with the Cling thing error? Is there anything I have missed while the project setup?
The error itself means that something is calling a method or getting an attribute on a python module instead of the class within the module.
This could happen if your module filename is the same as the class inside. Ie if you had cling.py and inside was a python class called cling.
Im not really up on python3 and I'm not sure whats causing this, I'm tempted to say it might be a circular dependency issue, or maybe one of the dependencies of dj-static ie static has been updated and caused this issue?
Maybe try to specify only dj-static in your requirements and remove the dependency on static as I believe dj-static should resolve its dependency on static by itself and that may be causing a conflict.
The documentation on heroku could be out of date.
I started using DjangoWhiteNoise instead of dj-static and no more problems.
In my case, I had an extraneous __init__.pyc in a subdirectory, where it shouldn't be. (Reason: as I moved modules around, the __init__.py was correctly deleted, but the compiled __init__.pyc had been left behind.)
Django's autodiscover then threw this error.
Deleting the unwanted __init__.pyc file fixed it.