Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voila prerender doesn't support markdown JupyterLab commands #1490

Open
davidkan6666 opened this issue Sep 20, 2024 · 1 comment
Open

Voila prerender doesn't support markdown JupyterLab commands #1490

davidkan6666 opened this issue Sep 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@davidkan6666
Copy link

davidkan6666 commented Sep 20, 2024

When using markdown cells containing JupyterLab commands, after being rendered by Voila, the required JavaScript libraries appear no longer available and result in errors like:

Command 'notebook:clear-all-cell-outputs' not registered
Command 'help:about' not registered
image

How to reproduce it?

  1. create a test notebook
  2. add the following code in Markdown cell:
    <button data-commandLinker-command="notebook:run-all-below" href="#">START</button> <button data-commandLinker-command="kernelmenu:interrupt" href="#">STOP</button> <button data-commandLinker-command="notebook:clear-all-cell-outputs" href="#">CLEAR</button> <button data-commandLinker-command="help:about" href="#">About</button>
  3. run the cell in the notebook
  4. buttons work
  5. now open notebook with Voila Prerender
  6. click on any button will result in something like "Uncaught (in promise) Error: Command 'help:about' not registered" from developer tool (F12) Console.
  • voila version 0.5.7
  • Operating System and version: Microsoft Windows 10
  • Browser and version: Chrome Version 128.0.6613.139 (Official Build) (64-bit) and FireFox 130.0.1 (64-bit)
Browser Output
2168.voila.js:1 Uncaught (in promise) Error: Command 'help:about' not registered.
    at d.execute (2168.voila.js:1:2959)
    at L._evtClick (1024.voila.js:1:35883)
    at L.handleEvent (1024.voila.js:1:35512)
2168.voila.js:1 Uncaught (in promise) Error: Command 'notebook:run-all-below' not registered.
    at d.execute (2168.voila.js:1:2959)
    at L._evtClick (1024.voila.js:1:35883)
    at L.handleEvent (1024.voila.js:1:35512)
2168.voila.js:1 Uncaught (in promise) Error: Command 'kernelmenu:interrupt' not registered.
    at d.execute (2168.voila.js:1:2959)
    at L._evtClick (1024.voila.js:1:35883)
    at L.handleEvent (1024.voila.js:1:35512)
2168.voila.js:1 Uncaught (in promise) Error: Command 'notebook:clear-all-cell-outputs' not registered.
    at d.execute (2168.voila.js:1:2959)
    at L._evtClick (1024.voila.js:1:35883)
    at L.handleEvent (1024.voila.js:1:35512)
  • JupyterLab version: 4.2.5
Installed Labextensions
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        @jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.3.7 enabled OK (python, voila)
        @jupyter-notebook/lab-extension v7.1.3 enabled OK
@davidkan6666 davidkan6666 added the bug Something isn't working label Sep 20, 2024
@fomightez
Copy link

Discussion thread related to this issue is here on the Jupyter Discourse Forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants