Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbconvert for python 3.9 crashing during the templateexporter.py #2149

Open
ale-franc opened this issue May 16, 2024 · 0 comments
Open

nbconvert for python 3.9 crashing during the templateexporter.py #2149

ale-franc opened this issue May 16, 2024 · 0 comments

Comments

@ale-franc
Copy link

ale-franc commented May 16, 2024

While trying to convert a minimum jupyter notebook we got the following message.

$ /opt/python/3.9.14/bin/python3.9 -m nbconvert --execute --stdout  --to=html /net/.../fs0/home/ias4ca/Untitled3.ipynb
Traceback (most recent call last):
  File "/opt/python/3.9.14/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/python/3.9.14/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/__main__.py", line 5, in <module>
    main()
  File "/opt/python/3.9.14/lib/python3.9/site-packages/jupyter_core/application.py", line 283, in launch_instance
    super().launch_instance(argv=argv, **kwargs)
  File "/opt/python/3.9.14/lib/python3.9/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line 420, in start
    self.convert_notebooks()
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/nbconvertapp.py", line 585, in convert_notebooks
    cls = get_exporter(self.export_format)
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/exporters/base.py", line 107, in get_exporter
    if getattr(exporter(config=config), "enabled", True):
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 350, in __init__
    super().__init__(config=config, **kw)
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", line 123, in __init__
    self._init_preprocessors()
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 535, in _init_preprocessors
    conf = self._get_conf()
  File "/home/ias4ca/.local/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 557, in _get_conf
    conf = recursive_update(conf, json.load(f))
  File "/opt/python/3.9.14/lib/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/opt/python/3.9.14/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/opt/python/3.9.14/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/python/3.9.14/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.18.1
ipykernel        : 6.29.3
ipywidgets       : 8.1.2
jupyter_client   : 7.4.9
jupyter_core     : 5.7.1
jupyter_server   : 2.13.0
jupyterlab       : 3.6.7
nbclient         : 0.9.0
nbconvert        : 7.16.4
nbformat         : 5.9.2
notebook         : 6.5.6
qtconsole        : 5.5.1
traitlets        : 5.14.1

cc: @rstub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant