bokeh: Bokeh Server is incompatible with tornado=4.5
There’s a currently undiagnosed issue where Bokeh Server applications are incompatible with the newest tornado v4.5 release.
The server appears to start normally, but doesn’t receive any requests or open any sessions when queried.
To reproduce:
- Install Bokeh v0.12.5 via conda or pip
- Run a Bokeh Server app example via
bokeh serve app.py(below is an example app) - Try (and fail) to open an application session at http://localhost:5006/line_on_off in a browser or via cURL. You’ll see that any request just hangs.
contents of app.py
""" Example demonstrating turning lines on and off - with bokeh server
"""
import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.palettes import Viridis3
from bokeh.plotting import figure
from bokeh.models import CheckboxGroup
p = figure()
props = dict(line_width=4, line_alpha=0.7)
x = np.linspace(0, 4 * np.pi, 100)
l0 = p.line(x, np.sin(x), color=Viridis3[0], legend="Line 0", **props)
l1 = p.line(x, 4 * np.cos(x), color=Viridis3[1], legend="Line 1", **props)
l2 = p.line(x, np.tan(x), color=Viridis3[2], legend="Line 2", **props)
checkbox = CheckboxGroup(labels=["Line 0", "Line 1", "Line 2"], active=[0, 1, 2], width=100)
def update(attr, old, new):
l0.visible = 0 in checkbox.active
l1.visible = 1 in checkbox.active
l2.visible = 2 in checkbox.active
checkbox.on_change('active', update)
layout = row(checkbox, p)
curdoc().add_root(layout)
Platform: MacOS and Ubuntu 14.04 Bokeh = 0.12.5 Tornado = 4.5
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 29 (16 by maintainers)
Commits related to this issue
- Update to provide Tornado 4.5 compat issues: fixes #6152 This PR updates functions in bokey.util.tornado to no longer rely on old behviour where gen.convert_yielded would raise gen.BadYieldedError w... — committed to bokeh/bokeh by bryevdv 7 years ago
- Updates to maintain compat with Tornado >= 4.5 issues: fixes #6152 Explicitly check for None and do not rely on BadYieldError being raised — committed to bokeh/bokeh by bryevdv 7 years ago
- downgrade tornado https://github.com/bokeh/bokeh/issues/6152 — committed to justinnaldzin/big-data-benchmarking by deleted user 7 years ago
Well, this has been fixed in master, the latest dev build does and the next release of Bokeh will work fine with Tornado 4.5 additionally the conda package in the defaults channel has had its dependencies updated so it will not install with 4.5 any longer. That still leaves the pip package, If someone knows a quick/surgical way to update the dependencies without cutting a new release, I’d be open to doing that. I’m just a little wary of adding info to the examples page that will quickly ne out of date.
A notice in the user guide or somewhere else would have saved me a few hours of head scratching…