Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905102 - dev-python/notebook-6.4.12 fails tests: "ValueError: No template sub-directory with name 'latex' found in the following paths:"
Summary: dev-python/notebook-6.4.12 fails tests: "ValueError: No template sub-director...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-26 03:53 UTC by Jonathan Lovelace
Modified: 2023-08-05 06:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python:notebook-6.4.12:20230426-033549.log (build.log,461.43 KB, text/x-log)
2023-04-26 04:08 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,9.09 KB, text/plain)
2023-04-26 04:09 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2023-04-26 03:53:12 UTC
=dev-python/notebook-6.4.12 fails its test phase for me. (I've also believe I've tried all the later versions in the tree, with similar results, but knowing which versions of which dependencies to add to package.accept_keywords is tricky enough I hesitate to specify one of those versions in the title of the bug.) Six tests in notebook/nbconvert/tests/test_nbconvert_handlers.py fail with "requests.exceptions.HTTPError: 500 Server Error: Intern..." (except one failing with an AssertionError because it got a 500 instead of a 404 error). The cause of these 500 errors is plain from the "captured log calls", such as the following:

DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1
WARNING  NotebookApp:manager.py:508 Notebook foo/testnb.ipynb is not trusted
DEBUG    NotebookApp:log.py:59 200 GET /a%40b/api/contents/foo/testnb.ipynb (127.0.0.1) 5.240000ms
DEBUG    NotebookApp:login.py:213 Accepting token-authenticated connection from 127.0.0.1
ERROR    NotebookApp:web.py:1798 Uncaught exception POST /a%40b/nbconvert/latex (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:12341', method='POST', uri='/a%40b/nbconvert/latex', version='HTTP/1.1', remote_ip='127.0.0.1
')
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/traitlets/traitlets.py", line 656, 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/lib/python3.10/site-packages/tornado/web.py", line 1711, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/usr/lib/python3.10/site-packages/tornado/web.py", line 3208, in wrapper
    return method(self, *args, **kwargs)
  File "/var/tmp/portage/dev-python/notebook-6.4.12/work/notebook-6.4.12/notebook/nbconvert/handlers.py", line 164, in post
    exporter = get_exporter(format, config=self.config)
  File "/var/tmp/portage/dev-python/notebook-6.4.12/work/notebook-6.4.12/notebook/nbconvert/handlers.py", line 67, in get_exporter
    Exporter = get_exporter(format)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/base.py", line 110, in get_exporter
    if getattr(exporter(config=config), "enabled", True):
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 348, in __init__
    super().__init__(config=config, **kw)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 122, in __init__
    self._init_preprocessors()
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 528, in _init_preprocessors
    conf = self._get_conf()
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 546, in _get_conf
    for path in map(Path, self.template_paths):
  File "/usr/lib/python3.10/site-packages/traitlets/traitlets.py", line 703, in __get__
    return self.get(obj, cls)
  File "/usr/lib/python3.10/site-packages/traitlets/traitlets.py", line 659, in get
    default = obj.trait_defaults(self.name)
  File "/usr/lib/python3.10/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults
    return self._get_trait_default_generator(names[0])(self)
  File "/usr/lib/python3.10/site-packages/traitlets/traitlets.py", line 1233, in __call__
    return self.func(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 557, in _template_paths
    template_names = self.get_template_names()
  File "/usr/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 642, in get_template_names
    raise ValueError(
ValueError: No template sub-directory with name 'latex' found in the following paths:
        /var/tmp/portage/dev-python/notebook-6.4.12/temp/tmp8idj9qi3/data
        /var/tmp/portage/dev-python/notebook-6.4.12/homedir/.local/share/jupyter
        /var/tmp/portage/dev-python/notebook-6.4.12/work/notebook-6.4.12-python3_10/install/usr/share/jupyter
        /var/tmp/portage/dev-python/notebook-6.4.12/temp/tmp8idj9qi3/share/jupyter
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
DEBUG    NotebookApp:handlers.py:249 Using contents: services/contents
ERROR    NotebookApp:log.py:55 {
  "Host": "localhost:12341",
  "Accept": "*/*",
  "User-Agent": "python-requests/2.28.2"
}
ERROR    NotebookApp:log.py:59 500 POST /a%40b/nbconvert/latex (127.0.0.1) 62.730000ms referer=None
Comment 1 Jonathan Lovelace 2023-04-26 04:08:40 UTC
Created attachment 860776 [details]
dev-python:notebook-6.4.12:20230426-033549.log
Comment 2 Jonathan Lovelace 2023-04-26 04:09:07 UTC
Created attachment 860777 [details]
emerge-info.txt
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 06:12:52 UTC
I've looked into it and I think that it's notebook 6.x doing something stupid that replaces /usr/share with <tempdir>/share in the test suite.  I can't reproduce the failure with 7.x, so I don't think it's worth spending more time on it.