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

ModuleNotFoundError: No module named 'fastjsonschema' #601

Open
s4m0r4m4 opened this issue May 7, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'fastjsonschema' #601

s4m0r4m4 opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@s4m0r4m4
Copy link

s4m0r4m4 commented May 7, 2024

Describe the bug

context
When I try to build sphinx docs with myst-nb...

expectation
I expected the docs to build.

bug
But instead the following error is:

$ jupyter-book build mybook
Running Sphinx v6.2.1

Exception occurred:
  File "/root/.cache/pypoetry/virtualenvs/.../site-packages/nbformat/json_compat.py", line 12, in <module>
    import fastjsonschema
ModuleNotFoundError: No module named 'fastjsonschema'

problem
It looks like ipython may now need the [notebook] add-in so that the fastjsonschema dependency is included by default: ipython/ipython#5979

Would have to change this line: https://github.com/executablebooks/MyST-NB/blob/master/pyproject.toml#L40

Reproduce the bug

Set up a project with the following dependencies:

[tool.poetry]
...

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

[tool.poetry.dependencies]
python = "^3.8"
python-dotenv = "^0.20.0"
requests = "^2.28.1"
pandas = ">1.4.3, <3.0.0"
pathlib = "^1.0.1"
openpyxl = "^3.0.10"
plotly = "^5.11.0"
deprecation = "^2.1.0"
isort = "^5.12.0"
typing-extensions = "^4.7.1"

[tool.poetry.group.dev.dependencies]
black = "^22.6.0"
coverage = "^6.4.2"
mypy = "1.5.0"
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
pylint = "^2.14.5"
taskipy = "^1.10.2"
types-requests = "^2.31.0.2"
types-urllib3 = "^1.26.23"
ipykernel = "^6.23.1"
pytest-xdist = "^3.3.1"
# add dev dependencies with `poetry add --dev` command

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
sphinx = "^6.2.1"
myst-parser = "^1.0.0"
sphinx-autobuild = "^2021.3.14"
sphinx-autodoc-typehints = "^1.12.0"
sphinx-multiversion = "^0.2.4"
sphinx-rtd-theme = "^1.3.0"
myst-nb = {version = "^1.0.0", python = "^3.9"}

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.taskipy.tasks]
get_latest_version = "git tag -l --sort=creatordate |grep -Eo '^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$' |tail -1"
build_docs = "(export LATEST_RELEASE_TAG=$(task get_latest_version); sphinx-multiversion docs build/html)"
docs = "sphinx-autobuild docs docs/_build/html --watch src"

Run task docs and see the error.

List your environment

No response

@s4m0r4m4 s4m0r4m4 added the bug Something isn't working label May 7, 2024
Copy link

welcome bot commented May 7, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant