我开始gunicorn typeidea.wsgi:application -w 4 -b 0.0.0.0:8000
,
但是我收到了错误
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 382, in resolve
found = getattr(found, frag)
AttributeError: module 'django' has no attribute 'utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ModuleNotFoundError: No module named 'django.utiles'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 708, in configure_handler
klass = self.resolve(cname)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 391, in resolve
raise v
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ValueError: Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
__import__(module)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/typeidea/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/utils/log.py", line 73, in configure_logging
logging_config_func(logging_settings)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 795, in dictConfig
dictConfigClass(config).configure()
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 566, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'mail_admins': Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
[2018-05-30 10:54:23 +0800] [6126] [INFO] Worker exiting (pid: 6126)
[2018-05-30 10:54:23 +0800] [6127] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 382, in resolve
found = getattr(found, frag)
AttributeError: module 'django' has no attribute 'utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ModuleNotFoundError: No module named 'django.utiles'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 708, in configure_handler
klass = self.resolve(cname)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 391, in resolve
raise v
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ValueError: Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
__import__(module)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/typeidea/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/utils/log.py", line 73, in configure_logging
logging_config_func(logging_settings)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 795, in dictConfig
dictConfigClass(config).configure()
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 566, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'mail_admins': Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
[2018-05-30 10:54:23 +0800] [6127] [INFO] Worker exiting (pid: 6127)
[2018-05-30 10:54:23 +0800] [6129] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 382, in resolve
found = getattr(found, frag)
AttributeError: module 'django' has no attribute 'utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ModuleNotFoundError: No module named 'django.utiles'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 708, in configure_handler
klass = self.resolve(cname)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 391, in resolve
raise v
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ValueError: Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
__import__(module)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/typeidea/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/utils/log.py", line 73, in configure_logging
logging_config_func(logging_settings)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 795, in dictConfig
dictConfigClass(config).configure()
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 566, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'mail_admins': Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
[2018-05-30 10:54:23 +0800] [6129] [INFO] Worker exiting (pid: 6129)
[2018-05-30 10:54:23 +0800] [6130] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 382, in resolve
found = getattr(found, frag)
AttributeError: module 'django' has no attribute 'utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ModuleNotFoundError: No module named 'django.utiles'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 558, in configure
handler = self.configure_handler(handlers[name])
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 708, in configure_handler
klass = self.resolve(cname)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 391, in resolve
raise v
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 384, in resolve
self.importer(used)
ValueError: Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
__import__(module)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/typeidea/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/django/utils/log.py", line 73, in configure_logging
logging_config_func(logging_settings)
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 795, in dictConfig
dictConfigClass(config).configure()
File "/home/jummy/.pyenv/versions/3.6.4/lib/python3.6/logging/config.py", line 566, in configure
'%r: %s' % (name, e))
ValueError: Unable to configure handler 'mail_admins': Cannot resolve 'django.utiles.log.AdminEmailHandler': No module named 'django.utiles'
[2018-05-30 10:54:23 +0800] [6130] [INFO] Worker exiting (pid: 6130)
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 209, in run
self.sleep()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 359, in sleep
ready = select.select([self.PIPE[0]], [], [], 1.0)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 244, in handle_chld
self.reap_workers()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 524, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jummy/workspace/typeidea-env3/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 203, in run
super(Application, self).run()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 231, in run
self.halt(reason=inst.reason, exit_status=inst.exit_status)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 344, in halt
self.stop()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
time.sleep(0.1)
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 244, in handle_chld
self.reap_workers()
File "/home/jummy/workspace/typeidea-env3/lib/python3.6/site-packages/gunicorn/arbiter.py", line 524, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
答案 0 :(得分:0)
尝试import django.utiles
看看django是否有这个模块