Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2022 22:49:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        python@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 267212] devel/py-nbconvert 7.2.1 fails to run option --to script
Message-ID:  <bug-267212-21822-CPFxl22171@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-267212-21822@https.bugs.freebsd.org/bugzilla/>
References:  <bug-267212-21822@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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=3D267212



--- Description ---
> jupyter nbconvert --to script some_notebook.ipynb=20
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py", line
645, in get
    value =3D 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=3D=3D7.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=3Dargv, **kwargs)
  File
"/usr/local/lib/python3.9/site-packages/traitlets/config/application.py", l=
ine
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 =3D 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=3Dconfig), "enabled", True):
  File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporte=
r.py
",
line 342, in __init__
    super().__init__(config=3Dconfig, **kw)
  File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", l=
ine
118, in __init__
    self._init_preprocessors()
  File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporte=
r.py
",
line 508, in _init_preprocessors
    conf =3D self._get_conf()
  File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporte=
r.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 =3D 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/templateexporte=
r.py
",
line 537, in _template_paths
    template_names =3D self.get_template_names()
  File
"/usr/local/lib/python3.9/site-packages/nbconvert/exporters/templateexporte=
r.py
",
line 621, in get_template_names
    raise ValueError(
ValueError: No template sub-directory with name 'script' found in the follo=
wing
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267212-21822-CPFxl22171>