Search code examples
python-sphinxconfiguration-filesdocumentation-generationread-the-docs

how can I make readthedocs find my configuration file which is already in GitHub project repository root directory?


I am trying to publish a Python package's documentation on readthedocs.org.

It was being published in previous releases. However, I am getting

"The configuration file required to build documentation is missing from your project."

Despite my .readthedocs.yaml being here: project Github repository

How can I fix this? I tried pointing to the root directory of the project from the advanced settings on readthedocs, but nothing seems to help.

Thank you.


Solution

  • From your https://github.com/icebearcanada/cavsiopy/blob/14d80b525657f3b219cf4b8217e76ea99f45d828/.readthedocs.yaml#L1-L6

    # Read the Docs configuration file for Sphinx projects
    # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
    
    # Required
    versions:
      - master
    

    The helpful link leads to documentation for the accepted keys. You need to change this:

    # Required
    version: 2
    

    versions is not a valid key. Furthermore, you do not need to specify a branch such as master because this configuration file is on a branch.