maintainer-feedback requested: [Bug 267212] devel/py-nbconvert 7.2.1 fails to run option --to script
Date: Wed, 19 Oct 2022 22:49:40 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-python (Nobody)
<python@FreeBSD.org> for maintainer-feedback:
Bug 267212: devel/py-nbconvert 7.2.1 fails to run option --to script
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267212
--- Description ---
> jupyter nbconvert --to script some_notebook.ipynb
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
645, in get
value = obj._trait_values[self.name]
KeyError: 'template_paths'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-nbconvert", line 33, in <module>
sys.exit(load_entry_point('nbconvert==7.2.1', 'console_scripts',
'jupyter-nbconvert')())
File "/usr/local/lib/python3.9/site-packages/jupyter_core/application.py",
line 269, in launch_instance
return super().launch_instance(argv=argv, **kwargs)
File
"/usr/local/lib/python3.9/site-packages/traitlets/config/application.py", line
978, in launch_instance
app.start()
File "/usr/local/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line
426, in start
self.convert_notebooks()
File "/usr/local/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line
594, in convert_notebooks
cls = get_exporter(self.export_format)
File "/usr/local/lib/python3.9/site-packages/nbconvert/exporters/base.py",
line 106, in get_exporter
if getattr(exporter(config=config), "enabled", True):
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py
",
line 342, in __init__
super().__init__(config=config, **kw)
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", line
118, in __init__
self._init_preprocessors()
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py
",
line 508, in _init_preprocessors
conf = self._get_conf()
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py
",
line 526, in _get_conf
for path in map(Path, self.template_paths):
File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
686, in __get__
return self.get(obj, cls)
File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
648, in get
default = obj.trait_defaults(self.name)
File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
1752, in trait_defaults
return self._get_trait_default_generator(names[0])(self)
File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
1132, in __call__
return self.func(*args, **kwargs)
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py
",
line 537, in _template_paths
template_names = self.get_template_names()
File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py
",
line 621, in get_template_names
raise ValueError(
ValueError: No template sub-directory with name 'script' found in the following
paths:
/home/user/.local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
The last ipynb to py conversion (--to script) here was done 2022-07-08 so a
version after that introduced this bug.