Failed to connect to Bokeh

Posted in General by Rodrigo Briet Thu May 05 2016 18:01:31 GMT+0000 (Coordinated Universal Time)·7·Viewed 6,932 times

I trying to run the "Monitors and Live Plotting" tutorial, but when i run the code a HTTP 599 error is returned with the IOError "Cannot push session document because we failed to connect to the server (to start the server, try the 'bokeh serve' command)". The server is running and listen to localhost:5006. At the same time, the server says "INFO:tornado.general:Malformed HTTP message from Malformed HTTP request line". Anyone have any tip to solve this?
May 5, 2016

Yep! Once you pip install bokeh, there should be a command available to run the server. Open your command line terminal and run:
bokeh serve
If you are using a virtualenv for python, make sure it is activated.

Does that work?

May 5, 2016

Oh sorry didn't see you had the server running! What version of Bokeh are you using?

May 5, 2016

I using bokeh 0.11.0

May 5, 2016

Wow found the bug! Bokeh changed so that you can't have spaces in the bokeh_doc_name any more. Here is the corrected line:
plot = Plot(bokeh_doc_name="Monitor_Tutorial", monitor_channels=weights_channel, open_browser=True)

I'm fixing it in the tutorial now, as well as pushing a hotfix to the master branch in opendeep to replace spaces with underscores.

marked this as solved
May 6, 2016

Thank you, it worked and the connection has no error. But now i got a new error about "ColumnDataSource" object has no attribute "stream" at line 177 in "opendeep/monitor/".

May 8, 2016

I solved my problem with ColumnDataSource. The requirements.txt says Bokeh version needs to be >= 0.11.0, but the OpenDeep is using the .stream() method and he only exist in Bokeh 0.11.1. I have updated and everything is working now.

May 8, 2016

Thanks for figuring that out! I was having trouble recreating the bug - I'll update the requirements.txt to include 0.11.1.

Markdown is allowed