JuliaGizmos / WebIO.jl

A bridge between Julia and the Web.
https://juliagizmos.github.io/WebIO.jl/latest/
Other
228 stars 64 forks source link

WebIO extension not found by nbconvert only #496

Closed tobydriscoll closed 1 year ago

tobydriscoll commented 1 year ago

The bug

WebIO works perfectly when I start jupyter from the command line and drop in a :p node. But if I use

jupyter nbconvert --execute --to html

on the same exact notebook, the resulting page has the dreaded "extension not detected" error. This is on macos Monterery.

Context

status:

[0f1e0344] WebIO v0.8.18
(base) [~/repos/SMiJ/pages]$ jupyter nbextension list                                                                                                                                 *[main]
Known nbextensions:
  config dir: /Users/driscoll/mambaforge/etc/jupyter/nbconfig
    notebook section
      jupytext/index  enabled 
      - Validating: OK
      nbdime/index  enabled 
      - Validating: OK
      webio-jupyter-nbextension/nbextension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK

(base) [~/repos/SMiJ/pages]$ jupyter labextension list                                                                                                                                *[main]
JupyterLab v3.4.5
/Users/driscoll/mambaforge/share/jupyter/labextensions
        jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        nbdime-jupyterlab v2.1.1 enabled OK
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        @jupyter-widgets/jupyterlab-manager v3.1.1 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /Users/driscoll/mambaforge/share/jupyter/lab

From the html output of nbconvert:

using WebIO
node(:p,"Hello world")
The WebIO Jupyter extension was not detected. See the [WebIO Jupyter integration documentation ](https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/)for more information.
twavv commented 1 year ago

WebIO requires an active kernel/JS to work. Your example is pretty simple, but in the general case trying to render static HTML won't work. I don't foresee this changing unfortunately.

tobydriscoll commented 1 year ago

Thanks for the explanation. I think plotly can do what I really wanted to accomplish, as it turns out.