为什么我在 运行 flask_gunicorn_embed 的 Bokeh 时出现 tornado KeyError?

Why am I getting tornado KeyError when running flask_gunicorn_embed for Bokeh?

我一直在尝试让 flask_gunicorn_embed.py 应用程序像 https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/flask_gunicorn_embed.py 中那样工作。

当我 运行 gunicorn -w 4 flask_gunicorn_embed.py 时,应用程序将 运行,但是当我在浏览器中访问该页面时,我得到

ERROR:tornado.application:Exception in callback None
Traceback (most recent call last):
  File "/root/apps/plotting-app/env/lib/python3.6/site-packages/tornado/ioloop.py", line 902, in start
    print(self._handlers[fd])
KeyError: 11[2019-12-30 14:48:28 -0600] [5774] [INFO] Worker exiting (pid: 5774)
[2019-12-30 14:48:28 -0600] [5773] [INFO] Worker exiting (pid: 5773)
[2019-12-30 14:48:28 -0600] [5771] [INFO] Worker exiting (pid: 5771)

我所做的只是复制示例 flask_gunicorn_embed.py、embed.html 和 theme.yaml,然后 运行 将其复制。可能是什么原因造成的?

更新 tornado 解决了这个问题!