Unable to start the server and open the dashboard

Hello,
I’m trying to follow the documentation for bokeh from here: First steps 1: Creating a line chart — Bokeh 3.3.2 Documentation and I did the first 5 steps .
With the below statement on the documentation page:
When you execute these lines of code, Bokeh creates an output file "lines.html".Bokeh also opens a browser to display it.
How should I open it directly on my default browser ?
Is there any specific command should I run to make it open the browser directly ?

I’m trying with below command on my docker container, but the localhost browser is not accessible …

(myvenv) $ bokeh serve --show bokeh_example.py
2023-04-11 15:49:40,650 Starting Bokeh server version 2.3.3 (running on Tornado 6.1)
2023-04-11 15:49:40,651 User authentication hooks NOT provided (default user enabled)
2023-04-11 15:49:40,656 Bokeh app running at: http://localhost:5006/bokeh_example
2023-04-11 15:49:40,656 Starting Bokeh server with process id: 380

Any help is most welcome.
Thanks

@ashishk Only Bokeh server applications need to be run with bokeh serve. That example is a plain Python script that can be run in the standard way:

python bokeh_example.py

cc @Timo perhaps we could add an explicit note here about how to run?

@Bryan : Thanks for your response!
I ran below command inside my docker container:
python3 bokeh_example.py
but on executing it, does it really opens the default browser to display the line chart?
for me, unfortunately it doesn’t … or maybe I’m doing something wrong here ?

Just speculation, but I can imagine something about being in a container might interfere with Python’s built-in webbrowser module. Regardless, it should have saved an HTML file output, which you can just open in a browser manually like any HTML file.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.