You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Extension error (jupyterlite_sphinx.jupyterlite_sphinx):
Handler <function jupyterlite_build at ...> for event 'build-finished' threw an exception (exception: Command '['jupyter', 'lite', 'build', '--debug', '--contents', '/home/u/projects/.../_contents', '--output-dir', '/home/u/projects/.../_build/html/lite', '--apps', 'notebooks', '--apps', 'edit', '--apps', 'lab', '--apps', 'repl', '--apps', 'tree', '--apps', 'consoles', '--lite-dir', '/home/u/projects/...]' returned non-zero exit status 2.)
make: *** [makefile:25: html] Error 2
TaskError - taskid:build:lite:patch:.gitlab-ci-local/artifacts/build-webpages/_build/html/lite/jupyter-lite.json
PythonAction Error
Traceback (most recent call last):
File "/home/u/projects/.../venv/lib/python3.12/site-packages/doit/action.py", line 461, in execute
returned_value = self.py_callable(*self.args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/u/projects/aydos.de/venv/lib/python3.12/site-packages/jupyterlite_core/addons/base.py", line 234, in merge_one_jupyterlite
out_path.write_text(json.dumps(config, **JSON_FMT), **UTF8)
File "/usr/lib/python3.12/pathlib.py", line 1047, in write_text
with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/pathlib.py", line 1013, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/u/projects/.../_build/html/lite/.gitlab-ci-local/artifacts/build-webpages/_build/html/lite/jupyter-lite.json'
You notice the path .gitlab-ci-local/.... It turns out that jupyterlite-sphinx (lite:patch) also ipynb and json 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 in conf.py did not work.
Proposed Solution
Subdirectories with . prefix are not read or there is an option to suppress specific directories.
The text was updated successfully, but these errors were encountered:
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?
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.The text was updated successfully, but these errors were encountered: