[FEATURE] Allowing native Bokeh server app support on Visual Studio Code
See original GitHub issueMy problem / request
Hi,
(This post is related to what I thought was a bug in the Jupyter extension of Visual Studio Code and is actually more of a missing feature in Bokeh)
I am working with Bokeh and Jupyter Notebooks in Visual Studio Code because, well … I like them. After a bit of fiddling with Server Apps for animated plots (following this example), I realised that they show no output in VSCode, and I did not see any error message while running the code.
Alternatives considered
I have run the code successfully in Jupyter Lab & Jupyter Notebook. So it is a VSCode+Bokeh problem.
What seems to be missing
Some people of the Jupyter Notebook community (thanks, @rchiodo !) have pointed me to the following error happening during the code execution (somehow I could not see it):
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'vscode-webview://8676e056-ff6e-461f-b0b9-4b600c50665f'; use --allow-websocket-origin=8676e056-ff6e-461f-b0b9-4b600c50665f or set BOKEH_ALLOW_WS_ORIGIN=8676e056-ff6e-461f-b0b9-4b600c50665f to permit this; currently we allow origins {'localhost:8888'}
WARNING:tornado.access:403 GET /ws?platform=electron (::1) 1.00ms
Solving the issue
Is there any way we could :
- Allow the plots from VSCode on-the-fly using just show() ?
- Alternatively, provide a bit more info to the user on where to set these options either :
- as a warning / message when the code is run,
- as a additional comment in the last lines of the nice example from above,
- or even in the documentation ?
Cheers,
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Bokeh server — Bokeh 3.0.3 Documentation
The Bokeh server is a component of Bokeh that allows you to build interactive web applications that are connected to Python code running...
Read more >Webview API - Visual Studio Code
The webview API allows extensions to create fully customizable views within ... to build complex user interfaces beyond what VS Code's native APIs...
Read more >Can a Bokeh server be run in the Jupyter extension of VS Code?
It is not yet clear whether integration with VSCode is possible, or not. Bokeh expects to be able to make an HTTP connection...
Read more >How to Build Interactive Data Visualizations for Python ... - InfoQ
Bokeh provides a Python API to create visual data applications in D3.js, without necessarily writing any JavaScript code. It allows the use ...
Read more >Top JupyterLab Alternatives in 2022 - Slashdot
Visual LANSA includes features such as access Controls/Permissions, code ... Open-source web application, the Jupyter Notebook, allows you to create and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FilJed I haven’t come back around to this in a couple months, but according to @Hoxbro in https://github.com/holoviz/holoviews/pull/5398, the following should work now.
I’ve created https://github.com/holoviz/panel/issues/3876 to try to get Panel up and running. I’ll come back here to document a workaround for Bokeh interactivity if I’m able to get that sorted out over there.