Sphinx autosummary “toctree contains reference to nonexisting document” warnings

后端 未结 3 969
耶瑟儿~
耶瑟儿~ 2020-12-25 10:56

I am trying to automatically create api docs for a large python codebase using Sphinx.

I have tried using build_modules.py and sphinx-apidoc. With either one, I can

3条回答
  •  鱼传尺愫
    2020-12-25 11:51

    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...
    /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!

提交回复
热议问题