Hello,
I am trying to set up Bokeh on a Raspberry Pi 2 running Debian.
I got everythign set up (albeit not using Anaconda), and it does also work - more or less.
Simple charts and lines show up properly, yet the server examples (which I am after) do not work correctly.
I am looking at the timeout.py example for instance, which shows the graph upon first loading, but no timeout occur (no colored numbers appear).
Instead when reloading the page (and this applies to any other graph), I am getting an error message:
pi@raspberrypi:~ $ bokeh serve timeout.py --host=192.168.178.16
DEBUG:bokeh.server.tornado:Allowed Host headers: [‘192.168.178.16:80’]
DEBUG:bokeh.server.tornado:These host origins can connect to the websocket: [‘localhost:5006’, ‘192.168.178.16:80’]
DEBUG:bokeh.server.tornado:Patterns are: [(’/timeout/?’, <class ‘bokeh.server.views.doc_handler.DocHandler’>, {‘application_context’: <bokeh.server.application_context.ApplicationContext object at 0x749835f0>, ‘bokeh_websocket_path’: ‘/timeout/ws’}), (’/timeout/ws’, <class ‘bokeh.server.views.ws.WSHandler’>, {‘application_context’: <bokeh.server.application_context.ApplicationContext object at 0x749835f0>, ‘bokeh_websocket_path’: ‘/timeout/ws’}), (’/timeout/autoload.js’, <class ‘bokeh.server.views.autoload_js_handler.AutoloadJsHandler’>, {‘application_context’: <bokeh.server.application_context.ApplicationContext object at 0x749835f0>, ‘bokeh_websocket_path’: ‘/timeout/ws’}), (’/static/(.*)’, <class ‘bokeh.server.views.static_handler.StaticHandler’>)]
INFO:bokeh.command.subcommands.serve:Starting Bokeh server on port 5006 with applications at paths [’/timeout’]
DEBUG:bokeh.client.connection:Running state NOT_YET_CONNECTED
INFO:bokeh.client.connection:Failed to connect to server: HTTPError(599, ‘Timeout’, None)
DEBUG:bokeh.client.connection:transitioning to state DISCONNECTED
DEBUG:bokeh.client.connection:Stopping client loop in state DISCONNECTED due to True from connected_or_closed
ERROR:bokeh.application.application:Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x74983050>: Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)
File “session.py”, line 269, in push:
raise IOError(“Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)”) Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/bokeh/application/handlers/code_runner.py”, line 71, in run
exec(self._code, module.__dict__)
File “/home/pi/timeout.py”, line 48, in
session = push_session(curdoc())
File “/usr/local/lib/python2.7/dist-packages/bokeh/client/session.py”, line 63, in push_session
session.push(document)
File “/usr/local/lib/python2.7/dist-packages/bokeh/client/session.py”, line 269, in push
raise IOError("Cannot push session document because we failed to connect to the server (to start the server, try the 'bokeh serve' command)")
IOError: Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)
INFO:tornado.access:200 GET /timeout (127.0.0.1) 20380.68ms
DEBUG:bokeh.server.tornado:[pid 18306] 0 clients connected
DEBUG:bokeh.server.tornado:[pid 18306] /timeout has 1 sessions with 1 unused
WARNING:tornado.access:404 GET /ws?bokeh-protocol-version=1.0&bokeh-session-id=5jM9XAqnsGLuvfVliiGfyX5BFYKHowBULdiCh7piEAoc (::1) 3.01ms
INFO:bokeh.server.views.ws:WebSocket connection opened
DEBUG:bokeh.server.views.ws:Receiver created for Protocol(u’1.0’)
DEBUG:bokeh.server.views.ws:ServerHandler created for Protocol(u’1.0’)
INFO:bokeh.server.views.ws:ServerConnection created
DEBUG:bokeh.server.session:Sending pull-doc-reply from session ‘49eodvGdzyu5tskX1i8VwewITl4LyqvudRdXTLUrz6sK’
DEBUG:bokeh.server.tornado:[pid 18306] 1 clients connected
DEBUG:bokeh.server.tornado:[pid 18306] /timeout has 1 sessions with 0 unused
DEBUG:bokeh.server.tornado:[pid 18306] 1 clients connected
DEBUG:bokeh.server.tornado:[pid 18306] /timeout has 1 sessions with 0 unused
DEBUG:bokeh.server.tornado:[pid 18306] 1 clients connected
DEBUG:bokeh.server.tornado:[pid 18306] /timeout has 1 sessions with 0 unused
What I see in the browser upon first load is the chart with no graph:
Whenever I try to reload the page, I am getting a blank page instead, and there is the same error message in the console (cannot connect to server).
Is this a known issue?
Can anyone help me with that?
Thanks in advance,
C.