Bokeh streaming error with scatter plot

I recently updated to 0.12.6 and started getting errors when streaming anything that included a scatter plot. I’ve attached a minimal example that gives me the errors (run with bokeh serve), but it seems to be specific to the scatter plot. Removing that call or replacing it with p.line() works just fine.

When I run the code, the browser window opens but remains totally blank and I get 1 instance of

ValueError(“expected an element of either String, Dict(Enum(‘field’, ‘value’, ‘transform’), Either (String, Instance(Transform), Float)) or Float, got {u’units’: u’screen’, u’field’, u’size’}”,)

followed by infinite

RuntimeError(‘Cannot apply patch to which is not in the document’,)

I’m running bokeh 0.12.6 with tornado 4.5.1, python 2.7, ubuntu 16.04. My coworkers can run the same code without errors with bokeh 0.12.5 and tornado 4.4.2. I tried downgrading tornado with pip since I saw that there had been some issues with 4.5.x at one point but bokeh serve continued to say it was using 4.5.1.

I’m at a loss as to what’s going on - can anyone point me in the right direction?

bokeh_error.py (588 Bytes)

There are some current issues with using bokeh.client (i.e. push_session and loop_until_closed) with some features (e.g. events and streaming)

However, even without these current bugs, I cannot stress enough (and evidently have not been able to stress enough, despite trying to) that this usage of bokeh.client is absolutely, 100% NOT ADVISED. Using bokeh.client in this way (with the app running "outside" the server) has inherent drawbacks that will never be overcome (described in the user's guide).

Whether you are running "bokeh serve app.py" or using a FunctionHander and embedding a Bokeh server programmatically in a script or a notebook, it is always, without fail, better to run the app IN a Bokeh server.

The *only* use I would ever advise using bokeh.client for is to pull specific session for an app running normally a Bokeh server, for the purpose of "tweaking it". This might be useful e.g. for serving customized versions of an app to different users looking at a Flask or Django page.

FYI I am basically almost to the point where I am going to remove every example in the repo that uses "session.loop_until_closed" under the premise that ever demonstrating it in the first place was a great mistake.

Thanks,

Bryan

···

On Sep 4, 2017, at 20:44, [email protected] wrote:

I recently updated to 0.12.6 and started getting errors when streaming anything that included a scatter plot. I've attached a minimal example that gives me the errors (run with bokeh serve), but it seems to be specific to the scatter plot. Removing that call or replacing it with p.line() works just fine.

When I run the code, the browser window opens but remains totally blank and I get 1 instance of
ValueError("expected an element of either String, Dict(Enum('field', 'value', 'transform'), Either (String, Instance(Transform), Float)) or Float, got {u'units': u'screen', u'field', u'size'}",)

followed by infinite
RuntimeError('Cannot apply patch to <UUID> which is not in the document',)

I'm running bokeh 0.12.6 with tornado 4.5.1, python 2.7, ubuntu 16.04. My coworkers can run the same code without errors with bokeh 0.12.5 and tornado 4.4.2. I tried downgrading tornado with pip since I saw that there had been some issues with 4.5.x at one point but bokeh serve continued to say it was using 4.5.1.

I'm at a loss as to what's going on - can anyone point me in the right direction?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/622403c4-eb9c-460b-b4ce-4ca16d13e5e8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<bokeh_error.py>

GitHub discussion:

  https://github.com/bokeh/bokeh/issues/6887

Thanks,

Bryan

···

On Sep 4, 2017, at 21:42, Bryan Van de ven <[email protected]> wrote:

There are some current issues with using bokeh.client (i.e. push_session and loop_until_closed) with some features (e.g. events and streaming)

However, even without these current bugs, I cannot stress enough (and evidently have not been able to stress enough, despite trying to) that this usage of bokeh.client is absolutely, 100% NOT ADVISED. Using bokeh.client in this way (with the app running "outside" the server) has inherent drawbacks that will never be overcome (described in the user's guide).

Whether you are running "bokeh serve app.py" or using a FunctionHander and embedding a Bokeh server programmatically in a script or a notebook, it is always, without fail, better to run the app IN a Bokeh server.

The *only* use I would ever advise using bokeh.client for is to pull specific session for an app running normally a Bokeh server, for the purpose of "tweaking it". This might be useful e.g. for serving customized versions of an app to different users looking at a Flask or Django page.

FYI I am basically almost to the point where I am going to remove every example in the repo that uses "session.loop_until_closed" under the premise that ever demonstrating it in the first place was a great mistake.

Thanks,

Bryan

On Sep 4, 2017, at 20:44, [email protected] wrote:

I recently updated to 0.12.6 and started getting errors when streaming anything that included a scatter plot. I've attached a minimal example that gives me the errors (run with bokeh serve), but it seems to be specific to the scatter plot. Removing that call or replacing it with p.line() works just fine.

When I run the code, the browser window opens but remains totally blank and I get 1 instance of
ValueError("expected an element of either String, Dict(Enum('field', 'value', 'transform'), Either (String, Instance(Transform), Float)) or Float, got {u'units': u'screen', u'field', u'size'}",)

followed by infinite
RuntimeError('Cannot apply patch to <UUID> which is not in the document',)

I'm running bokeh 0.12.6 with tornado 4.5.1, python 2.7, ubuntu 16.04. My coworkers can run the same code without errors with bokeh 0.12.5 and tornado 4.4.2. I tried downgrading tornado with pip since I saw that there had been some issues with 4.5.x at one point but bokeh serve continued to say it was using 4.5.1.

I'm at a loss as to what's going on - can anyone point me in the right direction?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/622403c4-eb9c-460b-b4ce-4ca16d13e5e8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<bokeh_error.py>