Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837671 - dev-python/nbformat-5.3.0: jupyter notebook fails to start with "ModuleNotFoundError: No module named 'fastjsonschema'"
Summary: dev-python/nbformat-5.3.0: jupyter notebook fails to start with "ModuleNotFou...
Status: RESOLVED FIXED
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: 837011
Blocks:
  Show dependency tree
 
Reported: 2022-04-10 15:45 UTC by Jan-Matthias Braun
Modified: 2022-04-10 16:26 UTC (History)
1 user (show)

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


Attachments
make fastjsonschema an unconditional dependency (make_fastjsonschema_an_unconditional_dependency.patch,659 bytes, patch)
2022-04-10 16:11 UTC, Jan-Matthias Braun
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Matthias Braun 2022-04-10 15:45:52 UTC
Starting
    /usr/bin/jupyter-notebook

fails with this backtrace:

Traceback (most recent call last):
File "/usr/lib/python-exec/python3.9/jupyter-notebook", line 5, in <module>
from notebook.notebookapp import main
File "/usr/lib/python3.9/site-packages/notebook/notebookapp.py", line 80, in <module>
from .services.contents.manager import ContentsManager
File "/usr/lib/python3.9/site-packages/notebook/services/contents/manager.py", line 17, in <module>
from nbformat import sign, validate as validate_nb, ValidationError
File "/usr/lib/python3.9/site-packages/nbformat/__init__.py", line 11, in <module>
from . import v1, v2, v3, v4
File "/usr/lib/python3.9/site-packages/nbformat/v4/__init__.py", line 39, in <module>
from .convert import downgrade, upgrade
File "/usr/lib/python3.9/site-packages/nbformat/v4/convert.py", line 13, in <module>
from .. import validator
File "/usr/lib/python3.9/site-packages/nbformat/validator.py", line 13, in <module>
from .json_compat import ValidationError, _validator_for_name, get_current_validator
File "/usr/lib/python3.9/site-packages/nbformat/json_compat.py", line 10, in <module>
import fastjsonschema
ModuleNotFoundError: No module named 'fastjsonschema'

The attached patch tries to fix this by making a fastjsonschema an unconditional dependency.
Currently, it is a BDEP when USE="test".

Reproducible: Always
Comment 1 Jan-Matthias Braun 2022-04-10 15:46:36 UTC
According to the comments, #837011 seems to suffer from the same issue.
Comment 2 Jan-Matthias Braun 2022-04-10 16:11:48 UTC
Created attachment 769856 [details, diff]
make fastjsonschema an unconditional dependency

I tried to fix this by puting fastjsonschema into DEPEND and including DEPEND in RDEPEND, to indicate that the dependency is required at runtime as well as at build time (with USE="test").
Comment 3 Larry the Git Cow gentoo-dev 2022-04-10 16:26:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfc2741b02ad801a9d47f38e415922ff930a2e4a

commit dfc2741b02ad801a9d47f38e415922ff930a2e4a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-10 16:25:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-10 16:26:34 +0000

    dev-python/nbformat: add missing dev-python/fastjsonschema dependency
    
    Closes: https://bugs.gentoo.org/837011
    Closes: https://bugs.gentoo.org/837671
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/nbformat/{nbformat-5.3.0.ebuild => nbformat-5.3.0-r1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)