[issue2579] Misleading 'toctree references unknown document' error

Henry report at bugs.python.org
Tue Apr 8 04:11:36 CEST 2008


New submission from Henry <misc at hl.id.au>:

The 'toctree references unknown document' can be misleading when the
document name includes whitespace.

For example, I had mistakenly created an index file of the form

.. toctree::
   :maxdepth: 2

    overview

(note that overview has a leading space). In the error message is was
very difficult to see that this was a problem, as the error message was

WARNING: /home/henry/code/bdec.docs/doc/source/index.rst:8: (WARNING/2)
toctree references unknown document  overview

By putting the document name in quotes, it becomes clearer what the
problem was.

WARNING: /home/henry/code/bdec.docs/doc/source/index.rst:8: (WARNING/2)
toctree references unknown document ' overview'

A patch to include these quotes has been attached.

----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
files: unknown_reference.patch
keywords: patch
messages: 65134
nosy: georg.brandl, henryl
severity: normal
status: open
title: Misleading 'toctree references unknown document' error
Added file: http://bugs.python.org/file9976/unknown_reference.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2579>
__________________________________


More information about the Python-bugs-list mailing list