spatialaudio / nbsphinx

:ledger: Sphinx source parser for Jupyter notebooks
https://nbsphinx.readthedocs.io/
MIT License
457 stars 130 forks source link

Running nbsphinx on readthedocs with version 0.8.7 fails #601

Open dzelge opened 3 years ago

dzelge commented 3 years ago

readthedocs uses version 0.8.7. These runs fail. When reproducing the error locally I get errors like this (Maybe you can see the whole stack here):

/home/helge/IdeaProjects/xcube-geodb/docs/source/notebooks/geoservice.ipynb:7: WARNING: Unexpected indentation.
/home/helge/IdeaProjects/xcube-geodb/docs/source/notebooks/geoservice.ipynb:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/helge/IdeaProjects/xcube-geodb/docs/source/notebooks/geoservice.ipynb:9: WARNING: Definition list ends without a blank line; unexpected unindent.

And then later:

/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_manage_collections' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_share_collections' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_explore_collections' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geoservice' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_manage_collections' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_share_collections' that doesn't have a title: no link will be generated
/home/docs/checkouts/readthedocs.org/user_builds/xcube-geodb/checkouts/latest/docs/source/index.rst:9: WARNING: toctree contains reference to document 'notebooks/geodb_explore_collections' that doesn't have a title: no link will be generated
/home/d

This does not happen with version 0.8.6.

My environment:

# packages in environment at /home/helge/miniconda3/envs/sphinx:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py39h3811e60_1001    conda-forge
ca-certificates           2021.7.5             h06a4308_1  
certifi                   2021.5.30        py39hf3d152e_0    conda-forge
cffi                      1.14.6           py39h4bc2ebd_1    conda-forge
chardet                   4.0.0            py39hf3d152e_1    conda-forge
charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
commonmark                0.9.1                      py_0    conda-forge
cryptography              3.4.7            py39hbca0aa6_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
docutils                  0.17.1           py39hf3d152e_0    conda-forge
entrypoints               0.3             py39hde42818_1002    conda-forge
future                    0.18.2           py39hf3d152e_3    conda-forge
idna                      3.2                pyhd3eb1b0_0  
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.8.1            py39hf3d152e_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter_client            7.0.3              pyhd8ed1ab_0    conda-forge
jupyter_core              4.8.1            py39hf3d152e_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
libffi                    3.4.2                h9c3ff4c_4    conda-forge
libgcc-ng                 11.2.0               h1d223b6_9    conda-forge
libgomp                   11.2.0               h1d223b6_9    conda-forge
libsodium                 1.0.18               h516909a_1    conda-forge
libstdcxx-ng              11.2.0               he4da1e4_9    conda-forge
markupsafe                2.0.1            py39h3811e60_0    conda-forge
mistune                   0.8.4           py39h3811e60_1004    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 6.2.0            py39hf3d152e_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nbsphinx                  0.8.7              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h7f98852_0    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandoc                    2.14.2               h7f98852_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyrsistent                0.18.0           py39h7f8727e_0  
pysocks                   1.7.1            py39hf3d152e_3    conda-forge
python                    3.9.7           hb7a2778_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pyyaml                    5.4.1                    pypi_0    pypi
pyzmq                     22.3.0           py39h37b5a0c_0    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
recommonmark              0.7.1              pyhd8ed1ab_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
setuptools                58.0.4           py39hf3d152e_2    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.2.0              pyh6c4a22f_0    conda-forge
sphinx_rtd_theme          1.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-redoc       1.6.0                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sqlite                    3.36.0               h9cd32fc_2    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h27826a3_1    conda-forge
tornado                   6.1              py39h3811e60_1    conda-forge
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2021a                he74cb21_1    conda-forge
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
mgeier commented 3 years ago

Your usage of source_suffix doesn't do what you think it does, see https://github.com/spatialaudio/nbsphinx/issues/595#issuecomment-902148464.

Previous versions of nbsphinx have hidden this problem, but it was already wrong. This has been fixed in #578, exposing the configuration error in its full ugliness.