executablebooks / sphinx-thebe

A Sphinx extension to convert static code into interactive code cells with Jupyter, Thebe, and Binder.
https://sphinx-thebe.readthedocs.io/en/latest/
MIT License
28 stars 15 forks source link

JavaScript output is disabled in JupyterLab (bokeh) #64

Open ydoJ opened 1 year ago

ydoJ commented 1 year ago

Describe the bug

context When I use 'Live Code' to run a cell that involves bokeh,

expectation I expected the plot to show like it did a week ago.

bug But instead I get the following error message: "JavaScript output is disabled in JupyterLab".

This is taken from the documentation after re-running the cells, but I get the same behavior in my book too. image

problem This is a problem for people using bokeh in their code cells because the plots are not showing up.

Reproduce the bug

  1. Go to a code cell that uses bokeh. For example, https://jupyterbook.org/en/stable/interactive/interactive.html#bokeh.
  2. Activate 'Live Code' by clicking the rocket symbol at the top of the page.
  3. Run the cells.

List your environment

> jupyter-book --version
Jupyter Book      : 0.14.0
External ToC      : 0.3.1
MyST-Parser       : 0.18.1
MyST-NB           : 0.17.1
Sphinx Book Theme : 0.4.0rc1
Jupyter-Cache     : 0.5.0
NbClient          : 0.5.13
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

stevejpurves commented 1 year ago

Thanks for reporting!

Ok, so this was working recently for you -- just to confirm; have there been any upgrades or redeployments at of your site recently, or it's all as it was when this was working for you?

There has not been an underlying thebe release recently, but sphinx-thebe was released recently, not sure how that can impact this if thebe has not changes but worth investigating...

btw - I suggest we transfer this over the sphinx-thebe

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

stevejpurves commented 1 year ago

On the link provided in the OP - there are javascript errors in the console, and the bokeh script appears to load the first time around, but then fails to attach to the DOM.

ydoJ commented 1 year ago

Thank you for looking into this. There have been redeployments of my site, but nothing in particular related to thebe or bokeh that might have caused it to stop working. I included the link to the documentation because I assumed that hasn't changed.