ModuleNotFoundError: No module named 'onlineMenu/wsgi' - django

I was going to host it using Heroku. But it does not work because of the problem with the profile.
This my Procfile
web: gunicorn onlineMenu.wsgi --log-file -
my wsgi.py code
"""
WSGI config for onlineMenu project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'onlineMenu.settings')
application = get_wsgi_application()
this is my Heroku log (not all)
2020-10-23T16:04:08.861587+00:00 app[web.1]: Traceback (most recent
call last): 2020-10-23T16:04:08.861588+00:00 app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/arbiter.py",
line 583, in spawn_worker 2020-10-23T16:04:08.861588+00:00 app[web.1]:
worker.init_process() 2020-10-23T16:04:08.861589+00:00 app[web.1]:
File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 119, in init_process 2020-10-23T16:04:08.861589+00:00 app[web.1]:
self.load_wsgi() 2020-10-23T16:04:08.861589+00:00 app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 144, in load_wsgi 2020-10-23T16:04:08.861590+00:00 app[web.1]:
self.wsgi = self.app.wsgi() 2020-10-23T16:04:08.861590+00:00
app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/base.py",
line 67, in wsgi 2020-10-23T16:04:08.861590+00:00 app[web.1]:
self.callable = self.load() 2020-10-23T16:04:08.861591+00:00
app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 49, in load 2020-10-23T16:04:08.861591+00:00 app[web.1]: return
self.load_wsgiapp() 2020-10-23T16:04:08.861591+00:00 app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 39, in load_wsgiapp 2020-10-23T16:04:08.861592+00:00 app[web.1]:
return util.import_app(self.app_uri) 2020-10-23T16:04:08.861592+00:00
app[web.1]: File
"/app/.heroku/python/lib/python3.8/site-packages/gunicorn/util.py",
line 358, in import_app 2020-10-23T16:04:08.861592+00:00 app[web.1]:
mod = importlib.import_module(module) 2020-10-23T16:04:08.861593+00:00
app[web.1]: File
"/app/.heroku/python/lib/python3.8/importlib/init.py", line 127,
in import_module 2020-10-23T16:04:08.861593+00:00 app[web.1]: return
_bootstrap._gcd_import(name[level:], package, level) 2020-10-23T16:04:08.861593+00:00 app[web.1]: File "", line 1014, in _gcd_import
2020-10-23T16:04:08.861594+00:00 app[web.1]: File "", line 991, in _find_and_load
2020-10-23T16:04:08.861594+00:00 app[web.1]: File "", line 973, in _find_and_load_unlocked
2020-10-23T16:04:08.861594+00:00 app[web.1]: ModuleNotFoundError: No
module named 'onlineMenu/wsgi' 2020-10-23T16:04:08.861841+00:00
app[web.1]: [2020-10-23 16:04:08 +0000] [10] [INFO] Worker exiting
(pid: 10) 2020-10-23T16:04:09.011977+00:00 app[web.1]: [2020-10-23
16:04:09 +0000] [4] [INFO] Shutting down: Master
2020-10-23T16:04:09.012166+00:00 app[web.1]: [2020-10-23 16:04:09
+0000] [4] [INFO] Reason: Worker failed to boot.

Related

Heroku - Django - the application loading process fails

I've been browsing all the options and advice on the internet for 14 days and I can't help it, please help me how to run a properly installed application on Heroku? I'm creating an application on Windows10 and I can't run "gunicorn" there locally, unfortunately, how do I debug or where am I making a mistake...?
2022-03-08T17:05:18.069332+00:00 heroku[web.1]: State changed from up to crashed
2022-03-08T17:05:18.091002+00:00 heroku[web.1]: State changed from crashed to starting
2022-03-08T17:05:17.994885+00:00 heroku[web.1]: Process exited with status 1
2022-03-08T17:05:24.550895+00:00 heroku[web.1]: Starting process with command gunicorn final_sda_project.wsgi --log-file -
2022-03-08T17:05:26.835207+00:00 heroku[web.1]: State changed from starting to up
2022-03-08T17:05:26.291724+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [4] [INFO] Starting gunicorn 20.1.0
2022-03-08T17:05:26.292294+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [4] [INFO] Listening at: http://0.0.0.0:12794 (4)
2022-03-08T17:05:26.292350+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [4] [INFO] Using worker: sync
2022-03-08T17:05:26.296152+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [9] [INFO] Booting worker with pid: 9
2022-03-08T17:05:26.399828+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [10] [INFO] Booting worker with pid: 10
2022-03-08T17:05:26.442367+00:00 app[web.1]: [2022-03-08 17:05:26 +0000] [11] [INFO] Booting worker with pid: 11
2022-03-08T17:05:27.924052+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [11] [ERROR] Exception in worker process
2022-03-08T17:05:27.924073+00:00 app[web.1]: Traceback (most recent call last):
2022-03-08T17:05:27.924074+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2022-03-08T17:05:27.924074+00:00 app[web.1]: worker.init_process()
2022-03-08T17:05:27.924075+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2022-03-08T17:05:27.924075+00:00 app[web.1]: self.load_wsgi()
2022-03-08T17:05:27.924075+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2022-03-08T17:05:27.924076+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-03-08T17:05:27.924077+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-03-08T17:05:27.924077+00:00 app[web.1]: self.callable = self.load()
2022-03-08T17:05:27.924077+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2022-03-08T17:05:27.924077+00:00 app[web.1]: return self.load_wsgiapp()
2022-03-08T17:05:27.924078+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2022-03-08T17:05:27.924078+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-03-08T17:05:27.924078+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2022-03-08T17:05:27.924079+00:00 app[web.1]: mod = importlib.import_module(module)
2022-03-08T17:05:27.924079+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.924079+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.924080+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.924080+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.924081+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.924081+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.924081+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.924081+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.924082+00:00 app[web.1]: File "/app/final_sda_project/wsgi.py", line 16, in
2022-03-08T17:05:27.924082+00:00 app[web.1]: application = get_wsgi_application()
2022-03-08T17:05:27.924082+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-03-08T17:05:27.924082+00:00 app[web.1]: django.setup(set_prefix=False)
2022-03-08T17:05:27.924083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/init.py", line 19, in setup
2022-03-08T17:05:27.924083+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2022-03-08T17:05:27.924083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 87, in getattr
2022-03-08T17:05:27.924083+00:00 app[web.1]: self._setup(name)
2022-03-08T17:05:27.924084+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 74, in _setup
2022-03-08T17:05:27.924084+00:00 app[web.1]: self._wrapped = Settings(settings_module)
2022-03-08T17:05:27.924084+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 183, in init
2022-03-08T17:05:27.924084+00:00 app[web.1]: mod = importlib.import_module(self.SETTINGS_MODULE)
2022-03-08T17:05:27.924085+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.924085+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.924085+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.924085+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.924086+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.924086+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.924086+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.924086+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.924086+00:00 app[web.1]: File "/app/final_sda_project/settings.py", line 154, in
2022-03-08T17:05:27.924087+00:00 app[web.1]: django_heroku.settings(locals())
2022-03-08T17:05:27.924087+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django_heroku/core.py", line 69, in settings
2022-03-08T17:05:27.924087+00:00 app[web.1]: config['DATABASES']['default'] = dj_database_url.config(conn_max_age=MAX_CONN_AGE, ssl_require=True)
2022-03-08T17:05:27.924088+00:00 app[web.1]: TypeError: config() got an unexpected keyword argument 'conn_max_age'
2022-03-08T17:05:27.924305+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [11] [INFO] Worker exiting (pid: 11)
2022-03-08T17:05:27.935940+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [10] [ERROR] Exception in worker process
2022-03-08T17:05:27.935942+00:00 app[web.1]: Traceback (most recent call last):
2022-03-08T17:05:27.935942+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2022-03-08T17:05:27.935943+00:00 app[web.1]: worker.init_process()
2022-03-08T17:05:27.935943+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2022-03-08T17:05:27.935944+00:00 app[web.1]: self.load_wsgi()
2022-03-08T17:05:27.935944+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2022-03-08T17:05:27.935945+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-03-08T17:05:27.935945+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-03-08T17:05:27.935946+00:00 app[web.1]: self.callable = self.load()
2022-03-08T17:05:27.935946+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2022-03-08T17:05:27.935946+00:00 app[web.1]: return self.load_wsgiapp()
2022-03-08T17:05:27.935947+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2022-03-08T17:05:27.935947+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-03-08T17:05:27.935947+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2022-03-08T17:05:27.935947+00:00 app[web.1]: mod = importlib.import_module(module)
2022-03-08T17:05:27.935948+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.935948+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.935949+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.935949+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.935949+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.935949+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.935950+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.935950+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.935950+00:00 app[web.1]: File "/app/final_sda_project/wsgi.py", line 16, in
2022-03-08T17:05:27.935950+00:00 app[web.1]: application = get_wsgi_application()
2022-03-08T17:05:27.935951+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-03-08T17:05:27.935951+00:00 app[web.1]: django.setup(set_prefix=False)
2022-03-08T17:05:27.935951+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/init.py", line 19, in setup
2022-03-08T17:05:27.935951+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2022-03-08T17:05:27.935952+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 87, in getattr
2022-03-08T17:05:27.935952+00:00 app[web.1]: self._setup(name)
2022-03-08T17:05:27.935952+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 74, in _setup
2022-03-08T17:05:27.935953+00:00 app[web.1]: self._wrapped = Settings(settings_module)
2022-03-08T17:05:27.935953+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 183, in init
2022-03-08T17:05:27.935953+00:00 app[web.1]: mod = importlib.import_module(self.SETTINGS_MODULE)
2022-03-08T17:05:27.935961+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.935961+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.935961+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.935961+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.935962+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.935962+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.935962+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.935962+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.935963+00:00 app[web.1]: File "/app/final_sda_project/settings.py", line 154, in
2022-03-08T17:05:27.935963+00:00 app[web.1]: django_heroku.settings(locals())
2022-03-08T17:05:27.935963+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django_heroku/core.py", line 69, in settings
2022-03-08T17:05:27.935964+00:00 app[web.1]: config['DATABASES']['default'] = dj_database_url.config(conn_max_age=MAX_CONN_AGE, ssl_require=True)
2022-03-08T17:05:27.935964+00:00 app[web.1]: TypeError: config() got an unexpected keyword argument 'conn_max_age'
2022-03-08T17:05:27.936163+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [10] [INFO] Worker exiting (pid: 10)
2022-03-08T17:05:27.946046+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [9] [ERROR] Exception in worker process
2022-03-08T17:05:27.946048+00:00 app[web.1]: Traceback (most recent call last):
2022-03-08T17:05:27.946049+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2022-03-08T17:05:27.946050+00:00 app[web.1]: worker.init_process()
2022-03-08T17:05:27.946050+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
2022-03-08T17:05:27.946051+00:00 app[web.1]: self.load_wsgi()
2022-03-08T17:05:27.946051+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2022-03-08T17:05:27.946051+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2022-03-08T17:05:27.946052+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2022-03-08T17:05:27.946052+00:00 app[web.1]: self.callable = self.load()
2022-03-08T17:05:27.946053+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2022-03-08T17:05:27.946054+00:00 app[web.1]: return self.load_wsgiapp()
2022-03-08T17:05:27.946054+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2022-03-08T17:05:27.946054+00:00 app[web.1]: return util.import_app(self.app_uri)
2022-03-08T17:05:27.946060+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2022-03-08T17:05:27.946060+00:00 app[web.1]: mod = importlib.import_module(module)
2022-03-08T17:05:27.946061+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.946061+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.946062+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.946062+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.946062+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.946063+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.946063+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.946063+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.946064+00:00 app[web.1]: File "/app/final_sda_project/wsgi.py", line 16, in
2022-03-08T17:05:27.946064+00:00 app[web.1]: application = get_wsgi_application()
2022-03-08T17:05:27.946064+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-03-08T17:05:27.946065+00:00 app[web.1]: django.setup(set_prefix=False)
2022-03-08T17:05:27.946065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/init.py", line 19, in setup
2022-03-08T17:05:27.946065+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2022-03-08T17:05:27.946065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 87, in getattr
2022-03-08T17:05:27.946066+00:00 app[web.1]: self._setup(name)
2022-03-08T17:05:27.946066+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 74, in _setup
2022-03-08T17:05:27.946066+00:00 app[web.1]: self._wrapped = Settings(settings_module)
2022-03-08T17:05:27.946067+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/conf/init.py", line 183, in init
2022-03-08T17:05:27.946067+00:00 app[web.1]: mod = importlib.import_module(self.SETTINGS_MODULE)
2022-03-08T17:05:27.946067+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2022-03-08T17:05:27.946068+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2022-03-08T17:05:27.946068+00:00 app[web.1]: File "", line 1030, in _gcd_import
2022-03-08T17:05:27.946068+00:00 app[web.1]: File "", line 1007, in _find_and_load
2022-03-08T17:05:27.946069+00:00 app[web.1]: File "", line 986, in _find_and_load_unlocked
2022-03-08T17:05:27.946069+00:00 app[web.1]: File "", line 680, in _load_unlocked
2022-03-08T17:05:27.946069+00:00 app[web.1]: File "", line 850, in exec_module
2022-03-08T17:05:27.946070+00:00 app[web.1]: File "", line 228, in _call_with_frames_removed
2022-03-08T17:05:27.946070+00:00 app[web.1]: File "/app/final_sda_project/settings.py", line 154, in
2022-03-08T17:05:27.946070+00:00 app[web.1]: django_heroku.settings(locals())
2022-03-08T17:05:27.946071+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django_heroku/core.py", line 69, in settings
2022-03-08T17:05:27.946071+00:00 app[web.1]: config['DATABASES']['default'] = dj_database_url.config(conn_max_age=MAX_CONN_AGE, ssl_require=True)
2022-03-08T17:05:27.946071+00:00 app[web.1]: TypeError: config() got an unexpected keyword argument 'conn_max_age'
2022-03-08T17:05:27.946283+00:00 app[web.1]: [2022-03-08 17:05:27 +0000] [9] [INFO] Worker exiting (pid: 9)
2022-03-08T17:05:28.022283+00:00 app[web.1]: [2022-03-08 17:05:28 +0000] [4] [WARNING] Worker with pid 10 was terminated due to signal 15
2022-03-08T17:05:28.026103+00:00 app[web.1]: [2022-03-08 17:05:28 +0000] [4] [WARNING] Worker with pid 9 was terminated due to signal 15
2022-03-08T17:05:28.115867+00:00 app[web.1]: [2022-03-08 17:05:28 +0000] [4] [INFO] Shutting down: Master
2022-03-08T17:05:28.116159+00:00 app[web.1]: [2022-03-08 17:05:28 +0000] [4] [INFO] Reason: Worker failed to boot.
2022-03-08T17:05:28.373912+00:00 heroku[web.1]: Process exited with status 3
2022-03-08T17:05:28.561601+00:00 heroku[web.1]: State changed from up to crashed
Check line 69 in your settings.py file, it is not getting the default database.
As you can see from the error code
08T17:05:27.946071+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django_heroku/core.py", line 69, in settings 2022-03-08T17:05:27.946071+00:00 app[web.1]: config['DATABASES']['default'] =

Heroku deployment succes but no module found

I am deploying the polls app from django tutorial to heroku.
My project seen from Pycharm have the following distribution:
My requirements file looks as:
Django==2.0.5
scikit-learn==0.19.1
numpy==1.13.3
pandas==0.22.0
pymysql==0.8.1
gunicorn==19.0.0
Runtime as:
python-3.6.5
Procfile as:
web: gunicorn inf-shf-373.wsgi:application --log-file -
When I deploy the app and goes to the browser I get an application error that says:
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
I retrieve the log using the heroku logs --tail --app inf-shf-373
statement.
Log
2018-06-15T10:08:51.529196+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:08:51.529198+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:08:51.529201+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:08:51.529199+00:00 app[web.1]: __import__(module)
2018-06-15T10:08:51.529202+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:08:51.529203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:08:51.529205+00:00 app[web.1]: worker.init_process()
2018-06-15T10:08:51.529206+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:08:51.529208+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:08:51.529209+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:08:51.529211+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:08:51.529212+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:08:51.529216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:08:51.529214+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:08:51.529218+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:08:51.529219+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:08:51.529221+00:00 app[web.1]: __import__(module)
2018-06-15T10:08:51.529222+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:08:51.529340+00:00 app[web.1]: 2018-06-15 10:08:51 [8] [INFO] Worker exiting (pid: 8)
2018-06-15T10:08:51.568925+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:08:51.568993+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2018-06-15T10:08:51.569405+00:00 app[web.1]: load_entry_point('gunicorn==19.0.0', 'console_scripts', 'gunicorn')()
2018-06-15T10:08:51.569437+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2018-06-15T10:08:51.569696+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2018-06-15T10:08:51.569725+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 166, in run
2018-06-15T10:08:51.570022+00:00 app[web.1]: super(Application, self).run()
2018-06-15T10:08:51.570050+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 71, in run
2018-06-15T10:08:51.570255+00:00 app[web.1]: Arbiter(self).run()
2018-06-15T10:08:51.570283+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 169, in run
2018-06-15T10:08:51.570559+00:00 app[web.1]: self.manage_workers()
2018-06-15T10:08:51.570587+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
2018-06-15T10:08:51.571398+00:00 app[web.1]: self.spawn_workers()
2018-06-15T10:08:51.571426+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 537, in spawn_workers
2018-06-15T10:08:51.572443+00:00 app[web.1]: time.sleep(0.1 * random.random())
2018-06-15T10:08:51.572572+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
2018-06-15T10:08:51.573025+00:00 app[web.1]: self.reap_workers()
2018-06-15T10:08:51.573611+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
2018-06-15T10:08:51.574215+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-15T10:08:51.574320+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-15T10:08:51.656203+00:00 heroku[web.1]: Process exited with status 1
2018-06-15T10:08:51.766089+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-15T10:08:51.768196+00:00 heroku[web.1]: State changed from crashed to starting
2018-06-15T10:08:59.756644+00:00 heroku[web.1]: Starting process with command `gunicorn inf-shf-373.wsgi:application --log-file -`
2018-06-15T10:09:01.853255+00:00 heroku[web.1]: Process exited with status 1
2018-06-15T10:09:01.754462+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Starting gunicorn 19.0.0
2018-06-15T10:09:01.754969+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Listening at: http://0.0.0.0:24374 (4)
2018-06-15T10:09:01.755073+00:00 app[web.1]: 2018-06-15 10:09:01 [4] [INFO] Using worker: sync
2018-06-15T10:09:01.758731+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [INFO] Booting worker with pid: 8
2018-06-15T10:09:01.762508+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [ERROR] Exception in worker process:
2018-06-15T10:09:01.762510+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.762511+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:09:01.762513+00:00 app[web.1]: worker.init_process()
2018-06-15T10:09:01.762514+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:09:01.762515+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:09:01.762516+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:09:01.762517+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:09:01.762519+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:09:01.762520+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:09:01.762521+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:09:01.762522+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:09:01.762523+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:09:01.762524+00:00 app[web.1]: __import__(module)
2018-06-15T10:09:01.762525+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:09:01.762526+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.762527+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 502, in spawn_worker
2018-06-15T10:09:01.762528+00:00 app[web.1]: worker.init_process()
2018-06-15T10:09:01.762529+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 114, in init_process
2018-06-15T10:09:01.762530+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2018-06-15T10:09:01.762532+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 66, in wsgi
2018-06-15T10:09:01.762533+00:00 app[web.1]: self.callable = self.load()
2018-06-15T10:09:01.762534+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-06-15T10:09:01.762535+00:00 app[web.1]: return self.load_wsgiapp()
2018-06-15T10:09:01.762536+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2018-06-15T10:09:01.762537+00:00 app[web.1]: return util.import_app(self.app_uri)
2018-06-15T10:09:01.762538+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 356, in import_app
2018-06-15T10:09:01.762543+00:00 app[web.1]: ModuleNotFoundError: No module named 'inf-shf-373'
2018-06-15T10:09:01.762539+00:00 app[web.1]: __import__(module)
2018-06-15T10:09:01.762635+00:00 app[web.1]: 2018-06-15 10:09:01 [8] [INFO] Worker exiting (pid: 8)
2018-06-15T10:09:01.790830+00:00 app[web.1]: Traceback (most recent call last):
2018-06-15T10:09:01.790840+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2018-06-15T10:09:01.791070+00:00 app[web.1]: load_entry_point('gunicorn==19.0.0', 'console_scripts', 'gunicorn')()
2018-06-15T10:09:01.791073+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2018-06-15T10:09:01.791209+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2018-06-15T10:09:01.791216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 166, in run
2018-06-15T10:09:01.791357+00:00 app[web.1]: super(Application, self).run()
2018-06-15T10:09:01.791360+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 71, in run
2018-06-15T10:09:01.791467+00:00 app[web.1]: Arbiter(self).run()
2018-06-15T10:09:01.791470+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 169, in run
2018-06-15T10:09:01.791600+00:00 app[web.1]: self.manage_workers()
2018-06-15T10:09:01.791603+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
2018-06-15T10:09:01.791814+00:00 app[web.1]: self.spawn_workers()
2018-06-15T10:09:01.791816+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 537, in spawn_workers
2018-06-15T10:09:01.792051+00:00 app[web.1]: time.sleep(0.1 * random.random())
2018-06-15T10:09:01.792055+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
2018-06-15T10:09:01.792184+00:00 app[web.1]: self.reap_workers()
2018-06-15T10:09:01.792187+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
2018-06-15T10:09:01.792383+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2018-06-15T10:09:01.792417+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2018-06-15T10:09:01.897234+00:00 heroku[web.1]: State changed from starting to crashed
2018-06-15T10:09:15.812856+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=inf-shf-373.herokuapp.com request_id=32838b77-14c1-4235-8ac1-9823f14dab4b fwd="80.94.4.53" dyno= connect= service= status=503 bytes= protocol=https
I believe that setting.py at my project directory doesn't have an app called inf-shf-373, but it is the random name created by heroku. This means that my whole app name, and then the references at Procfile should be surveys (I changed the polls name to surveys despite the tutorial).
Any reference to what is the problem?
EDIT
Answering DanielRoseman:
The wsgi.py file is at: code/computationalMarketing/computationalMarketing/wsgi.py
Extra information:
Is it possible that the problem can be that the wsgi.py file is not in the main path of the repo? The django project is the first computationalMarketing folder (this project is all gathered at code folder), the other folders that exists at the same level are sql mods, and vagrant files.
Finally I have been able to solve this question.
I have found the parameter chdir at gunicorn, which stablish the path to the wsgi.py file at django app.
An example:
web: gunicorn --chdir code/computationalMarketing computationalMarketing.wsgi --log-file -

Problems to deploy django in heroku

Follow the log:
2016-03-05T15:09:05.318884+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.318885+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.318888+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.318886+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.318888+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.318890+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.318885+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.318893+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.318895+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.318889+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.318891+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.318892+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.319022+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [9] [INFO] Worker exiting (pid: 9)
2016-03-05T15:09:05.318890+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.318894+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.318896+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.318897+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324196+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [10] [ERROR] Exception in worker process:
2016-03-05T15:09:05.318892+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.318896+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324211+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.324212+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.324213+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-03-05T15:09:05.324215+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.318894+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.318898+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.324216+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.318898+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324216+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.324221+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.324219+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.318899+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.324222+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.324208+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324213+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.324214+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-03-05T15:09:05.324210+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-03-05T15:09:05.324211+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.324218+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.324214+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.324220+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.324224+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324217+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.324218+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.324220+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.324251+00:00 app[web.1]: self.load_wsgi()
2016-03-05T15:09:05.324225+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.324250+00:00 app[web.1]: worker.init_process()
2016-03-05T15:09:05.324248+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324226+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.324252+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-03-05T15:09:05.324224+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324250+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-03-05T15:09:05.324255+00:00 app[web.1]: return self.load_wsgiapp()
2016-03-05T15:09:05.324222+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.324223+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324255+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-03-05T15:09:05.324253+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-03-05T15:09:05.324254+00:00 app[web.1]: self.callable = self.load()
2016-03-05T15:09:05.324251+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-03-05T15:09:05.324252+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-03-05T15:09:05.324254+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-03-05T15:09:05.324256+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-03-05T15:09:05.324258+00:00 app[web.1]: application = get_wsgi_application()
2016-03-05T15:09:05.324259+00:00 app[web.1]: django.setup()
2016-03-05T15:09:05.324259+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
2016-03-05T15:09:05.324260+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
2016-03-05T15:09:05.324261+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
2016-03-05T15:09:05.324257+00:00 app[web.1]: __import__(module)
2016-03-05T15:09:05.324258+00:00 app[web.1]: File "/app/redewebsite/wsgi.py", line 21, in <module>
2016-03-05T15:09:05.324264+00:00 app[web.1]: ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
2016-03-05T15:09:05.382734+00:00 app[web.1]: Traceback (most recent call last):
2016-03-05T15:09:05.324257+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
2016-03-05T15:09:05.324261+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2016-03-05T15:09:05.324262+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
2016-03-05T15:09:05.324262+00:00 app[web.1]: self._setup(name)
2016-03-05T15:09:05.324263+00:00 app[web.1]: % (desc, ENVIRONMENT_VARIABLE))
2016-03-05T15:09:05.383454+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2016-03-05T15:09:05.383456+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 206, in run
2016-03-05T15:09:05.324374+00:00 app[web.1]: [2016-03-05 15:09:05 +0000] [10] [INFO] Worker exiting (pid: 10)
2016-03-05T15:09:05.382767+00:00 app[web.1]: sys.exit(run())
2016-03-05T15:09:05.383460+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 219, in handle_chld
2016-03-05T15:09:05.382753+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2016-03-05T15:09:05.383455+00:00 app[web.1]: Arbiter(self).run()
2016-03-05T15:09:05.383460+00:00 app[web.1]: time.sleep(0.1)
2016-03-05T15:09:05.383457+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 302, in halt
2016-03-05T15:09:05.382793+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2016-03-05T15:09:05.383457+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2016-03-05T15:09:05.383458+00:00 app[web.1]: self.stop()
2016-03-05T15:09:05.383459+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 347, in stop
2016-03-05T15:09:05.383462+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2016-03-05T15:09:05.382834+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2016-03-05T15:09:05.382860+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 192, in run
2016-03-05T15:09:05.383453+00:00 app[web.1]: super(Application, self).run()
2016-03-05T15:09:05.383461+00:00 app[web.1]: self.reap_workers()
2016-03-05T15:09:05.383462+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 464, in reap_workers
2016-03-05T15:09:05.383463+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2016-03-05T15:09:06.271890+00:00 heroku[web.1]: Process exited with status 1
2016-03-05T15:09:06.284071+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-05T15:09:08.486440+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=redewebsite.herokuapp.com request_id=083bbcbc-0cac-459b-af5b-c7ea9f59e080 fwd="189.48.111.130" dyno= connect= service= status=503 bytes=
2016-03-05T15:10:17.486279+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=redewebsite.herokuapp.com request_id=64746251-2419-4525-b257-695effd9f15d fwd="189.48.111.130" dyno= connect= service= status=503 bytes=
When I run heroku open, return-me 503 and the message:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Someone could help me?

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.

Heroku App Crashed Django

I am trying to deploy my Django website onto Heroku but when I load my site, I get this error:
Application Error:
An error occurred in the application and your page could not be
served. Please try again in a few moments.
If you are the application owner, check your logs for details.
So I type heroku logs and this is what I got:
2015-02-20T15:49:36.361800+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.361809+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.361801+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.361803+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.361805+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.361808+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.361811+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.361815+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.361817+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.361812+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.361819+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.361814+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.361818+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.361823+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.361821+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.361822+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.361829+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.361830+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.361929+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [9] [INFO] Worker exiting (pid: 9)
2015-02-20T15:49:36.361825+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.361828+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.361826+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488086+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-20T15:49:36.488087+00:00 app[web.1]: worker.init_process()
2015-02-20T15:49:36.488090+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.488092+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.488093+00:00 app[web.1]: self.callable = self.load()
2015-02-20T15:49:36.488089+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.488103+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.488099+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.488100+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.488101+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.488082+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [10] [ERROR] Exception in worker process:
2015-02-20T15:49:36.488076+00:00 app[web.1]: /app/static/
2015-02-20T15:49:36.488084+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.488106+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.488108+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.488131+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.488111+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.488113+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.488095+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.488133+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.488140+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2015-02-20T15:49:36.488136+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
2015-02-20T15:49:36.488096+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-20T15:49:36.488141+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2015-02-20T15:49:36.488143+00:00 app[web.1]: self.callable = self.load()
2015-02-20T15:49:36.488097+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.488148+00:00 app[web.1]: return util.import_app(self.app_uri)
2015-02-20T15:49:36.488104+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.488153+00:00 app[web.1]: File "/app/django_test/wsgi.py", line 14, in <module>
2015-02-20T15:49:36.488110+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.488158+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
2015-02-20T15:49:36.488157+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.488160+00:00 app[web.1]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2015-02-20T15:49:36.488150+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 355, in import_app
2015-02-20T15:49:36.488107+00:00 app[web.1]: django.setup()
2015-02-20T15:49:36.488151+00:00 app[web.1]: __import__(module)
2015-02-20T15:49:36.488163+00:00 app[web.1]: logging_config_func(logging_settings)
2015-02-20T15:49:36.488114+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.488132+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.488129+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488164+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 794, in dictConfig
2015-02-20T15:49:36.488165+00:00 app[web.1]: dictConfigClass(config).configure()
2015-02-20T15:49:36.488168+00:00 app[web.1]: '%r: %s' % (name, e))
2015-02-20T15:49:36.488139+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 116, in init_process
2015-02-20T15:49:36.488135+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.488137+00:00 app[web.1]: worker.init_process()
2015-02-20T15:49:36.488167+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/logging/config.py", line 576, in configure
2015-02-20T15:49:36.507131+00:00 app[web.1]: super(Application, self).run()
2015-02-20T15:49:36.507076+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 189, in run
2015-02-20T15:49:36.488146+00:00 app[web.1]: return self.load_wsgiapp()
2015-02-20T15:49:36.488144+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2015-02-20T15:49:36.507001+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
2015-02-20T15:49:36.506915+00:00 app[web.1]: Traceback (most recent call last):
2015-02-20T15:49:36.506970+00:00 app[web.1]: sys.exit(run())
2015-02-20T15:49:36.507154+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
2015-02-20T15:49:36.507531+00:00 app[web.1]: self.reap_workers()
2015-02-20T15:49:36.507476+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 210, in handle_chld
2015-02-20T15:49:36.507269+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2015-02-20T15:49:36.488147+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2015-02-20T15:49:36.488154+00:00 app[web.1]: application = get_wsgi_application()
2015-02-20T15:49:36.488171+00:00 app[web.1]: [2015-02-20 15:49:36 +0000] [10] [INFO] Worker exiting (pid: 10)
2015-02-20T15:49:36.507190+00:00 app[web.1]: Arbiter(self).run()
2015-02-20T15:49:36.507453+00:00 app[web.1]: time.sleep(0.1)
2015-02-20T15:49:36.507056+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2015-02-20T15:49:36.507382+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 338, in stop
2015-02-20T15:49:36.507715+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2015-02-20T15:49:36.488161+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/log.py", line 87, in configure_logging
2015-02-20T15:49:36.488170+00:00 app[web.1]: ValueError: Unable to configure handler 'default': [Errno 2] No such file or directory: '/app/logs/mylog.log'
2015-02-20T15:49:36.507292+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 293, in halt
2015-02-20T15:49:36.507213+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 197, in run
2015-02-20T15:49:36.507642+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2015-02-20T15:49:36.507358+00:00 app[web.1]: self.stop()
2015-02-20T15:49:36.488155+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
2015-02-20T15:49:36.506923+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2015-02-20T15:49:36.507554+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 455, in reap_workers
2015-02-20T15:49:37.304329+00:00 heroku[web.1]: State changed from up to crashed
2015-02-20T15:49:37.292485+00:00 heroku[web.1]: Process exited with status 1
2015-02-20T15:49:36.299215+00:00 heroku[web.1]: State changed from starting to up
2015-02-20T15:49:42.613930+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=article-django.herokuapp.com request_id=5e18c64f-98b1-4f2b-a88b-c9d93a0908e9 fwd="173.3.238.36" dyno=web.1 connect=5001ms service= status=503 bytes=
I looked at this log and it seems like the main problem is something with '/app/logs/mylog.log' not existing. If that's the case, how I do I create that file?
Edit: Here is the LOGGING section of my settings.py file:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins':{
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'email_backend':
'django.core.mail.backends.filebased.EmailBackend',
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propogate': True,
},
}
}
/app is directory in which your application is put on Heroku. Try to add logs directory in root of your project and push it to Heroku - directory will then exist so log file should be created without problems.