First of all. I am not sure if this is the right place to ask, probably not but I am hoping I am not the only one in a situation that I believe should be very common to many here.
The problem: I am using Anaconda and I have installed the ‘jupyter_contrib_nbextensions’ package in normal Jupyter Notebooks via conda. The good thing that it does all work fine.
Now, I want to keep some of the extension features also when using nbconvert to export to an html file. The read the docs for nbextensions does talk about it but if I am honest they seem very sparse and in any case I am getting some errors that I don’t understand and any help is appreciated.
I have made this very simple notebook and the only extension feature I would like to have when exporting to html is the collapsible headings. So I have tried the following:
jupyter nbconvert --to html_ch testexport.ipynb
I get the following error:
[NbConvertApp] WARNING | Config option
kernel_spec_manager_class
not recognized byNbConvertApp
.
[NbConvertApp] Converting notebook testexport.ipynb to html_ch
Traceback (most recent call last):
File “C:\Users\MyName\anaconda3\envs\mysqltest\Scripts\jupyter-nbconvert-script.py”, line 10, in
sys.exit(main())
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\jupyter_core\application.py”, line 254, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\traitlets\config\application.py”, line 845, in launch_instance
app.start()
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\nbconvertapp.py”, line 350, in start
self.convert_notebooks()
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\nbconvertapp.py”, line 524, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\nbconvertapp.py”, line 489, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\nbconvertapp.py”, line 418, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\exporter.py”, line 181, in from_filename
return self.from_file(f, resources=resources, **kw)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\exporter.py”, line 199, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\jupyter_contrib_nbextensions\nbconvert_support\exporter_inliner.py”, line 32, in from_notebook_node
nb, resources, **kw)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\html.py”, line 119, in from_notebook_node
return super().from_notebook_node(nb, resources, **kw)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\templateexporter.py”, line 384, in from_notebook_node
output = self.template.render(nb=nb_copy, resources=resources)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\templateexporter.py”, line 148, in template
self._template_cached = self._load_template()
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\nbconvert\exporters\templateexporter.py”, line 355, in _load_template
return self.environment.get_template(template_file)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\jinja2\environment.py”, line 883, in get_template
return self._load_template(name, self.make_globals(globals))
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\jinja2\environment.py”, line 857, in _load_template
template = self.loader.load(self, name, globals)
File “C:\Users\MyName\anaconda3\envs\mysqltest\lib\site-packages\jinja2\loaders.py”, line 429, in load
raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: inliner
i have tried to look around but could not really find much. Also:
jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.3.0
qtconsole : not installed
ipython : 7.22.0
ipykernel : 5.3.4
jupyter client : 6.1.12
jupyter lab : not installed
nbconvert : 6.0.7
ipywidgets : not installed
nbformat : 5.1.3
traitlets : 5.0.5
Is it possible it is an issue with nbconvert? I would be really surprised if so. If I can give more information that is helpful to fix this I am here. It would really important for me, thanks.