Closed prjemian closed 2 years ago
Is this due to Python version (3.8 is used)? Try Py3.9.
Aha! Swap the order of the channels here. https://github.com/bluesky/hklpy/blob/de21ead8c784ea4257a209c0cc9cd47864bc3637/.github/workflows/publish-docs.yml#L59
Trying to replicate, so far cannot reproduce locally:
micromamba create -y -n dev-hklpy python=3.8
micromamba install -y -n dev-hklpy -f environment.yml
micromamba install -y -n dev-hklpy jupyter nbconvert "sphinx=4.4.0" sphinx_rtd_theme nbsphinx sphinxcontrib-napoleon make flake8 black pandoc -c conda-forge -c defaults
eval "$(micromamba shell hook --shell=bash)"
micromamba activate dev-hklpy
pip install -e .
make -C docs clean html
Locally, no problem building with either Py 3.8 or 3.9. Need to get a list of the specific packages installed in the Actions workflow run.
Note Sphinx version 5.0.2 is available but the workflow installs 4.4.0. Curious, that.
Good time to switch the workflow to micromamba (#231).
I'm not convinced that module 'jinja2.utils' has no attribute 'escape'
is the real problem here.
See: https://github.com/jupyter/nbconvert/issues/1736 which means to compare the jinja2 version between workflow and local.
It's a miracle, with commit 11fa1ad (for #231), the documentation builds without error.
Since switching to [nbsphinx](), the workflow that publishes documentation has failed (https://github.com/bluesky/hklpy/runs/6995106866?check_suite_focus=true, https://github.com/bluesky/hklpy/runs/6995279669?check_suite_focus=true) with this error:
This error might not be limited to this one notebook. The workflow stops on the first error: