Search code examples
tornadobokeh

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


I've been trying to get the flask_gunicorn_embed.py app working as in https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/flask_gunicorn_embed.py.

When I run gunicorn -w 4 flask_gunicorn_embed.py the app will run, but then when I access the page in my browser I get

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)

All I'm doing is copying the example flask_gunicorn_embed.py, embed.html and theme.yaml and running it. What could be causing this?


Solution

  • Updating tornado solved this issue!