Loading extensions through HTMLManager?

#1

I’ve created a front-end widget manager by extending from HTMLManager and setup a connection to a running jupyter kernel (with python -m notebook --no-browser), however, when I try to get the kernel to parse some plotting code using Plotly, I get the error message

Could not load module plotlywidget@^0.10.0

The code works if I run it in a normal jupyter notebook.

I’m guessing that it’s because setting up the kernel manager manually isn’t loading the Jupyter extensions (plotlywidget in this case).

Is there any way that I can get the kernel manager to load extensions?

Thanks in advance.

#2

You’ll need to overload the loadClass method for the kernel manager to make the extension available. You can search the ipywidgets codebase for loadClass to see some examples.