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

Sphinx v6.1.0+ raises ValueError("node line not found") during linkcheck #11119

Closed
matthewfeickert opened this issue Jan 10, 2023 · 4 comments
Closed

Comments

@matthewfeickert
Copy link

matthewfeickert commented Jan 10, 2023

Describe the bug

For sphinx v6.1.0+ running linkcheck will fail with

Exception occurred:
  File ".../lib/python3.10/site-packages/sphinx/util/nodes.py", line 278, in get_node_line
    raise ValueError("node line not found")
ValueError: node line not found

with the following traceback (for Sphinx v6.1.0): sphinx-err-is6b_zcu.log

For sphinx<6.1.0 linkcheck will run as expected and pass without errors.

I don't have a minimal failing example at the moment, so I apologize but I am going to produce a fully reproducible full example, though I know that isn't preferable

How to Reproduce

$ docker run --rm -ti python:3.10 /bin/bash
root@25758314b85b:/# python -m venv venv && . venv/bin/activate
(venv) root@25758314b85b:/# python -m pip --quiet install --upgrade pip setuptools wheel
(venv) root@25758314b85b:/# apt-get update && apt-get install -y pandoc
(venv) root@25758314b85b:/# git clone https://github.com/scikit-hep/pyhf.git
(venv) root@25758314b85b:/# cd pyhf/
(venv) root@25758314b85b:/pyhf# python -m pip --quiet install --upgrade .[docs,test]
(venv) root@25758314b85b:/pyhf# python -m pip list | grep -i sphinx
nbsphinx                      0.8.11
Sphinx                        6.1.2
sphinx-click                  4.4.0
sphinx-copybutton             0.5.1
sphinx-issues                 3.0.1
sphinx-rtd-theme              0.5.1
sphinx-togglebutton           0.3.2
sphinxcontrib.applehelp       1.0.3
sphinxcontrib-bibtex          2.5.0
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
(venv) root@25758314b85b:/pyhf# cd docs
(venv) root@25758314b85b:/pyhf/docs# make linkcheck
...
reading sources... [100%] release-notes/v0.7.0                                                                                                                                        
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 91%] index                                                                                                                                                        
Exception occurred:
  File "/venv/lib/python3.10/site-packages/sphinx/util/nodes.py", line 280, in get_node_line
    raise ValueError("node line not found")
ValueError: node line not found
The full traceback has been saved in /tmp/sphinx-err-n3wxneib.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:199: linkcheck] Error 2
(venv) root@25758314b85b:/pyhf/docs#

Environment Information

Platform:              linux; (Linux-5.15.0-56-generic-x86_64-with-glibc2.31)
Python version:        3.10.9 (main, Dec 21 2022, 18:59:22) [GCC 10.2.1 20210110])
Python implementation: CPython
Sphinx version:        6.1.2
Docutils version:      0.19
Jinja2 version:        3.1.2
Pygments version:      2.14.0

Sphinx extensions

I haven't produced a minimal set yet, but I can work on it. At the moment the extensions are

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.coverage',
    'sphinx.ext.mathjax',
    'sphinx.ext.ifconfig',
    'sphinx.ext.viewcode',
    'sphinx.ext.githubpages',
    'sphinx.ext.intersphinx',
    'sphinxcontrib.bibtex',
    'sphinx.ext.napoleon',
    'sphinx_click.ext',
    'nbsphinx',
    'sphinx_issues',
    'sphinx_copybutton',
    'sphinx_togglebutton',
    'xref',
]

Additional context

No response

@francoisfreitag
Copy link
Contributor

francoisfreitag commented Jan 10, 2023

Narrowed down to the following index.rst:

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/main/docs/_static/img/pyhf-logo-small.png
   :alt: pyhf logo
   :width: 320
   :align: center

Edit: it seems to be caused by the :align: center option.

@AA-Turner
Copy link
Member

I have released v6.1.3 which should fix this.

A

@matthewfeickert
Copy link
Author

Amazing! The Sphinx team is fantastically fast at resolving bugs when new releases come out and I can't thank you enough!

This has been fixed with Sphinx v6.1.3 so I'm closing now.

@jfbu jfbu added this to the 6.1.3 milestone Jan 10, 2023
@jfbu
Copy link
Contributor

jfbu commented Jan 10, 2023

fixed at 31162a9 (released as 6.1.3)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants