jupyter-book / thebe

Turn static HTML pages into live documents with Jupyter kernels.
https://thebe.readthedocs.io
BSD 3-Clause "New" or "Revised" License
395 stars 68 forks source link

Only one output rendered #778

Open sglyon opened 4 days ago

sglyon commented 4 days ago

If I run a code cell that has multiple outputs, only the first one is rendered in the output area.

To reproduce go to the thebe demo, activate the kernel, and replace the contents of the code cell with something like

print("Hello")
print("world")
print(1234)

and click run

When I do this, I get the following:

Image

NOTE

If I click run many times, occasionally I will see all 3 outputs, but often it is just one

stevejpurves commented 4 days ago

Thanks for reporting this @sglyon Looks like this might be specifically related to thebe-lite as that demo is using the juptyerlite/pyodide back end.

this binder example works as expected: https://jupyter-book.github.io/thebe/binder.html

also I note that if I hit Run multiple times on the thebe-lite demo that you linked to originally, I intermittently get the wrong/right output, until the session dies.

sglyon commented 3 days ago

Hey @stevejpurves the note about being specific to jupyter-lite sounds right to me

The trouble is that this is the backend I'm using in my project!

Do you have any suggestions for how we can track down this error. I'm happy to investigate more, but would be forced to inefficiently wander around the thebe/pyodide/jupyterlite/jupyterlab codebases to hunt it down