Workaround for Bokeh graphs not showing in PyCharm Professional

I am writing this fix/workaround so that it is searchable/googleable (no need for response, just hopefully it will help someone else, I spent few hours debugging it).

If Bokeh graphs are not showing in PyCharm Jupyter notebooks (but you can see it in browser), you need to do this small change in the notebook code in output_notebook as written below.

Notebook must be trusted, it happens that it “untrusts” itself sometimes

First, make sure the notebook is marked “trusted”, otherwise javascript won’t run - checkbox in PyCharm or use command line:

jupyter trust "notebook_filename.ipynb"

(sometimes it happens that notebook “untrusts” itself even after you marked it trusted - no idea why that happens, just keep watch)

The issue and fix/workaround for Bokeh graphs shown in PyCharm

When there is

output_notebook(INLINE)

in the notebook code, each instance of that call needs to be changed to

output_notebook()

Now you should be able to see graphs in PyCharm as well, as well as working debug of cells, stepping and showing variables, e.g.:

Version info (so that whoever finds this can tell how recent it is)

Chipwhisperer repo version: commit 534fe4881bb54723eb43df465cc54b406d9ccc4f from Mar 20 2023 (later than 5.7.0) on Linux
Bokeh: 2.4.3
PyCharm version: 2022.3.3 Build #PY-223.8836.43, built on March 10, 2023

Reason why the bug happens

There seems to be some sort of race condition in passing data through ZMQStream. Without inline the source is called from bokeh CDN. I already made a ticket for it in JetBrains tracker.