我在下面遇到错误,该错误一直重复发生,直到使用DigitUtil
退出程序为止。
我正在使用以下命令和wsgi脚本。
命令:ctrl-c
wsgi.py :
gunicorn --bind 0.0.0.0:5000 wsgi:app
重复的错误日志:
错误的重要行
from app import application
if __name__ == "__main__":
application.run()
我不知道出了什么问题。谁能帮我这个忙。谢谢。
PS:您可以看到`gunicorn: error: unrecognized arguments: --bind 0.0.0.0:5000 wsgi:app
`
[2018-09-03 14:02:47 +0000] [4429] [INFO] Starting gunicorn 19.9.0
[2018-09-03 14:02:47 +0000] [4429] [INFO] Listening at: http://0.0.0.0:5000 (4429)
[2018-09-03 14:02:47 +0000] [4429] [INFO] Using worker: sync
[2018-09-03 14:02:47 +0000] [4432] [INFO] Booting worker with pid: 4432
/root/analytics/ner-api/neuroNER/src/utils_plots.py:8: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
The backend was *originally* set to 'TkAgg' by the following code:
File "/root/analytics/venv-nerapi/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/base.py", line 223, in run
super(Application, self).run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/arbiter.py", line 203, in run
self.manage_workers()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/arbiter.py", line 545, in manage_workers
self.spawn_workers()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/arbiter.py", line 616, in spawn_workers
self.spawn_worker()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/util.py", line 350, in import_app
__import__(module)
File "/root/analytics/ner-api/wsgi.py", line 1, in <module>
from app import application
File "/root/analytics/ner-api/app/__init__.py", line 12, in <module>
from app import routes
File "/root/analytics/ner-api/app/routes.py", line 9, in <module>
from neuroNER.src import *
File "/root/analytics/ner-api/neuroNER/src/evaluate.py", line 2, in <module>
import matplotlib.pyplot as plt
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/matplotlib/pyplot.py", line 71, in <module>
from matplotlib.backends import pylab_setup
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/matplotlib/backends/__init__.py", line 16, in <module>
line for line in traceback.format_stack()
matplotlib.use('Agg') # http://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined
/root/analytics/ner-api/neuroNER/src/neuroner.py:2: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
The backend was *originally* set to 'TkAgg' by the following code:
File "/root/analytics/venv-nerapi/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/base.py", line 223, in run
super(Application, self).run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/root/analytics/venv-nerapi/lib/python3.5/site-packages/gunicorn/arbiter.py", line 203, in run
被重复了两次。重复执行直到停止烧瓶应用程序。