Search code examples
python-sphinxread-the-docs

Readthedocs - need sphinx 2.1+ to process the :async: option


My first public Python project is now on readthedocs (RTD). There is one problem I'm trying to fix, but without success so far.

I'm using the :async: option to mark coroutines. This is supported by sphinx 2.1+. RTD used sphinx 1.8.5 for my project. All coroutines are simply skipped from the HTML output, i.e not documented at all. That is quite bad.

I created docs/requirements.txt file in my project containing: sphinx>=2.1.0 and in RTD > admin > advanced settings I have entered: /docs/requirements.txt as "A pip requirements file needed to build your documentation. Path from the root of your project.". Don't know if this is the right way to specifiy the sphinx version. Anyway I tried.

The build failed:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: '../../../../../../../../docs/requirements.txt'

How could I overcome these problems to have all coroutines properly documented?


Solution

  • RTD cannot find your requirements file. Try specifying the path relative to the root of your project, not as absolute, by removing the leading slash.