Sphinx autosummary "toctree contains reference to nonexisting document" warnings

Solution 1:

Sorry for such a late answer (if it can be considered that) but I found this link that discusses what may be happening to you:

https://github.com/phn/pytpm/issues/3#issuecomment-12133978

The idea that if you have some special Doc scraper in your documentation code that is building autosummary documentation after autosummary has already run may be something to look into if you are still having this issue. Although, I'm not sure how much help this will be.

The key from the link is to add: numpydoc_show_class_members = False to conf.py

Solution 2:

If you are using the numpydoc extension, you could consider removing it and using sphinx.ext.napoleon instead.

Since version 1.3, Numpy and Google style docstrings are in fact supported by this builtin extension.

Removing numpydoc and using sphinx.ext.napoleon in your conf.py will therefore probably solve your problem.


Sources

  • Napoleon - Marching toward legible docstrings
  • Sphinx Doc - Support for NumPy and Google style docstrings

Solution 3:

I just encountered this issue too and spend hours on this, The following worked for me:

Sphinx can be fussy, and sometimes about things you weren’t expecting. For example, you well encounter something like:

WARNING: toctree contains reference to nonexisting document u'all-about-me'
...
checking consistency...
<your repository>/my-first-docs/docs/all-about-me.rst::
WARNING: document isn't included in any toctree'

Quite likely, what has happened here is that you indented all-about-me in your .. toctree:: with four spaces, when Sphinx is expecting three.

Source: docs!