以下报错没有详细的信息,不知道代码具体哪里出了问题
Traceback (most recent call last):
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 203, in run
self.manage_workers()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 545, in manage_workers
self.spawn_workers()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 617, in spawn_workers
time.sleep(0.1 * random.random())
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
self.reap_workers()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer:
只需要在输入gunicorn命令的时候在后边加上参数 –preload,便可看到详细的报错信息
加上参数后的报错信息如下:
Traceback (most recent call last):
File "/home/charleswu/.virtualenvs/process/bin/gunicorn", line 11, in
sys.exit(run())
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
super(Application, self).run()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 60, in __init__
self.setup(app)
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/arbiter.py", line 120, in setup
self.app.wsgi()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/charleswu/.virtualenvs/process/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
__import__(module)
File "/home/charleswu/AiDoctor/process_bchao/app.py", line 44, in
app = create_application()
File "/home/charleswu/AiDoctor/process_bchao/app.py", line 31, in create_application
from webapi import image_api
File "/home/charleswu/AiDoctor/process_bchao/webapi/__init__.py", line 3, in
from .upload_image import image_api
File "/home/charleswu/AiDoctor/process_bchao/webapi/upload_image.py", line 9, in
from interface import get_b_result
File "/home/charleswu/AiDoctor/process_bchao/interface.py", line 6, in
from structuration import Struct
File "/home/charleswu/AiDoctor/process_bchao/structuration.py", line 7, in
from split_word import desc_list, diag_list
ModuleNotFoundError: No module named 'split_word'
搞定!