Open goekce opened 3 weeks ago
Thanks for reporting, @goekce! I guess JupyterLite is trying to pick up its JSON configuration file from an unrelated location, which it shouldn't. Could you provide a small project or a script so that we have a reproducer?
Is it legit if I demonstrate that using jupyterlite-sphinx
? 🙂
git clone https://github.com/jupyterlite/jupyterlite-sphinx && cd jupyterlite-sphinx/docs
virtualenv venv
. ./venv/bin/activate
pip install voici pydata-sphinx-theme myst-parser jupyterlite-sphinx
sphinx-build -M html . _build # Builds successfully
mkdir .test
cp -r . .test
sphinx-build -M html . _build # Fails 💀
Output:
Extension error (jupyterlite_sphinx.jupyterlite_sphinx):
Handler <function jupyterlite_build at 0x746c9c755260> for event 'build-finished' threw an exception (exception: Command '['jupyter', 'lite', 'build', '--debug', '--contents', './custom_contents', '--contents', '/home/u/projects/jupyterlite-sphinx/docs/_contents', '--output-dir', '/home/u/projects/jupyterlite-sphinx/docs/_build/html/lite', '--apps', 'notebooks', '--apps', 'edit', '--apps', 'lab', '--apps', 'repl', '--apps', 'tree', '--apps', 'consoles', '--apps', 'voici', '--lite-dir', '/home/u/projects/jupyterlite-sphinx/docs']' returned non-zero exit status 2.)
I use gitlab-ci-local
which creates a cache under .gitlab-ci-local
which leads to the same error.
It looks related to these issues in JupyterLite:
It would be great to fix it in jupyterlite-core
, as they seem to be happening quite often.
If anyone would like to look into it, that would be great, thanks!
Problem
I am new to the project and could not get
jupyterlite-sphinx
running on top of my existing Sphinx site in less than three hours. One of the reasons was:Which does not say much but can be expanded using https://jupyterlite-sphinx.readthedocs.io/en/latest/configuration.html#suppressing-jupyterlite-logging. I saw then the following:
You notice the path
.gitlab-ci-local/...
. It turns out thatjupyterlite-sphinx
(lite:patch
) alsoipynb
andjson
files in directories unrelated to the project, which leads to an error. I could not find any option to not read.gitlab-ci-local
.exclude_patterns
inconf.py
did not work.Proposed Solution
Subdirectories with
.
prefix are not read or there is an option to suppress specific directories.