0

I'm trying to setup a templates manager extension called jupyterlab multicontents templates and I cannot seem to get the templates to show in the templates tab.

I pip installed the extension via a terminal in the jupyterlab UI, I did have to add pypi as a trusted source due to network firewalls:

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org jupyterlab_multicontents_templates

When I run the command jupyter server extension list all of the other preinstalled extensions show as installed an enabled:

output from extension list command

The first thing I checked was to ensure the IPython is actually installed, it is:

which ipython

I'm using the jupyter/minimal-notebook:latest docker image for this test. I've updated the jupyter config (located at /etc/jupyter/jupyter_notebook_config.py) file to add the locations that I want to put templates for this test.

c.JupyterLabMultiContentsTemplates.template_folders = {
    "lessons": {
        "manager_class": "IPython.html.services.contents.filemanager.FileContentsManager",
        "kwargs": {
            "root_dir": "/home/jovyan/lessons"
        },
    },
    "utilities": {
        "manager_class": "IPython.html.services.contents.filemanager.FileContentsManager",
        "kwargs": {
            "root_dir": "/home/jovyan/lessons"
        },
    },
}

Those folders do exist and there are ipynb notebooks in them but the template tab is always blank. I'm guessing the config isn't the cause here and the real issue is how to get this extension to recognize that ipython exists.

I'm still fairly new to python so I'm hoping that the solution is some simple configuration update or something added to the system path.

Thanks.

jasono
  • 213
  • 2
  • 13
  • 1
    This is a compatibility bug in the extension. It [attempts to import](https://github.com/lydian/jupyterlab_multicontents_templates/blob/52806e4d41f42c435d09fb7f6b3fd82900367392/jupyterlab_multicontents_templates/handlers.py#L8) `IPythonHandler` from `IPython.html.base.handlers` but there is no such a module in recent IPython versions. It seems you already opened an issue: https://github.com/lydian/jupyterlab_multicontents_templates/issues/1 - good – krassowski May 13 '23 at 19:09

0 Answers0