include directive error message

Anonymous avatarAnonymous created an issue

If an include directive is used with a bogus filename, the error message generated does not yield the name of the bogus file.

.. include:: bogusfile.rst

yields the error message: /home/mspiegel/temp/test-sphinx/source/index.rst:: (SEVERE/4) Problems with "include" directive path: IOError: (2, 'No such file or directory'). make: * [html] Error 1

Our documentation team has started using Sphinx (thank you! very good output in PDF and HTML format!). But we have novice developers on our team, and they need a little extra guidance to help them find the mistakes they make.

Comments (5)

  1. Georg Brandl
    • changed status to open
    • marked as bug

    Hmm, it looks like this for me:

    /home/gbr/devel/sphinx0.6/doc/concepts.rst:55: (SEVERE/4) Problems with "include" directive path:
    IOError: [Errno 2] No such file or directory: 'foo'.
    

    What version of Python and docutils are you using?

  2. Anonymous

    Curiouser and curiouser. I get a good error message on an OS X system that has Sphinx 0.6.2 and Python 2.5.1. But I get the bad error message on my Ubuntu 9.10 machine with Sphinx 0.6.3 and Python 2.6.4. And based on the output from 'locate' I think docutils 0.5 is installed on both machines. It sounds like a Python 2.5 versus Python 2.6 issue?

  3. Matt Williams

    I'm running Python 2.6.2 with Sphinx 1.0b2 and docutils 0.6 and I get the good descriptive error message that Georg mentioned.

    Since it's just a standard Python IOError, it must be a Python version thing. Perhaps Ubuntu patched Python in some way?

  4. Georg Brandl

    In any case, I think it's sufficiently proven that this is not a Sphinx issue.

    For further investigation, you'd have to look at your docutils' docutils/parsers/rst/directives/misc.py, specifically around line 70 where it says raise self.severe(...).

  5. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.