3

I am very new to Sphinx. Doc says it is easy to set up - maybe so but I am having a bear of a time. I finally have .rst files being created but while I have updated index.rst I am getting this error. I confirmed the .rst files exist in the /docs directory. Below are the syspath from my conf.py and the index.

I have tried all of these combinations without success - the .rst files reside in /home/efultz/src/Sicom2.0/docs

sys.path.insert(0, os.path.abspath('/home/efultz/src/Sicom2.0/'))
sys.path.insert(0, os.path.abspath('/home/efultz/src/Sicom2.0/docs'))
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, '/home/efultz/src/Sicom2.0/')

I have the following in the index.rst - I have confirmed there are only 3 spaces before the individual filenames

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   Base
   BaseAPI
   EventLogger
   SICOMToConnex
   SICOMToConnexAPI
   SICOMToConnexAPIProduct
   SICOMToConnexDemo
   SICOMToConnexParser
   SICOMToConnexParserAPI
   SICOMToConnexParserAPIProduct
   product
   modules
bad_coder
  • 11,289
  • 20
  • 44
  • 72
efultz
  • 1,135
  • 2
  • 11
  • 26
  • 1
    Are the documents listed in the `toctree` located in the same directory as index.rst? – mzjn Jul 09 '18 at 18:28
  • No - under docs I have build and source - the .rst files are under docs while the index.rst is in the source directory. I moved the files to the source directory and things are working now - is there a path that will work without my moving the files? – efultz Jul 09 '18 at 18:32
  • I think you should put all RST files in the **docs** directory. – mzjn Jul 09 '18 at 18:37
  • 3
    Modifying `sys.path` has no effect on the way a toctree works. – mzjn Jul 09 '18 at 18:40

1 Answers1

2

I found by configuring to use the same directory instead of splitting directories when the .RST files were created they were where they needed to be.

efultz
  • 1,135
  • 2
  • 11
  • 26