1

I’ve got a problem visualizing the documentation of my project in Read the Docs. Everything works fine locally by executing the command make html, but in Read the Docs the functions that should be generated by the directive automodule don’t show up.

This is how my repository is structured.

In the conf.py I set the absolute path as follows: sys.path.insert(0, os.path.abspath('../..')), and then I used the following instruction for automatically describing the functions contained in the Python module in my documentation:

.. automodule:: library.module1
    :members:

However, no functions are shown by compiling the doc in Read The Docs. I also tried to install my project in a virtualenv by specifying a requirements.txt file in the RTD advanced settings, but this doesn’t work either. Any suggestions?

mzjn
  • 48,958
  • 13
  • 128
  • 248
kr34
  • 11
  • 1
  • 1
    Provide a link to the build log on RTD. It will say why it cannot build your docs. I suspect that you have not followed all the necessary steps. See also https://stackoverflow.com/a/46995305/2214933 and https://stackoverflow.com/a/45316259/2214933 – Steve Piercy Sep 21 '18 at 23:26
  • Here's the link to the build log: https://readthedocs.org/projects/genereg/builds/7814214/. The build is successful, but functions are not shown in the documentation. – kr34 Sep 27 '18 at 20:15
  • The build log's UI is an "accordion". Click on the first instance of `python /home/docs/checkouts/readthedocs.org/user_builds/genereg/envs/latest/bin/sphinx-build -T -...` to see details. RTD did not import your package because you did not follow all the steps as I mentioned previously. There should be an accordion with both something like `python /home/docs/checkouts/readthedocs.org/user_builds/pyramid/envs/latest/bin/pip install --exists-action=w --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/pyramid/.cache/pip -r rtd.txt` and `python setup.py install --force` – Steve Piercy Sep 28 '18 at 00:03
  • I tried using a requirements.txt file (https://raw.githubusercontent.com/Kia23/genereg/master/requirements.txt) as suggested in the links provided above, installing the project in a virtualenv, but most of the packages specified fail to be imported, returning in the build log (https://readthedocs.org/projects/genereg/builds/7861471/) the error "could not find a version that satisfies the requirement". – kr34 Sep 29 '18 at 07:59
  • Perhaps it's a Python requirement mismatch? Your package requires >=3.6, while RTD uses 3.5. The only other reason I can imagine is a temporary network or PyPI outage. Sorry I'm not much more help here. – Steve Piercy Sep 29 '18 at 12:23

0 Answers0