readthedocs.org: Sphinx error: master file [..]/checkouts/latest/contents.rst not found
I’m still new to readthedocs.org and have no experience with either Python nor Sphinx, please excuse me if I’m doing something obviously wrong. I googled the error and have found other builds failing with the same error, but when I looked at their commits that lead to a successful build, the changes didn’t make sense to me.
Details
- Project URL: https://readthedocs.org/projects/hoodie-test
- Build URL (if applicable): https://readthedocs.org/projects/hoodie-test/builds/4846469
- Read the Docs username (if applicable): gr2m
Expected Result
I expected a new version of docs to be built at http://hoodie-test.readthedocs.io/en/latest/
Actual Result
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/envs/latest/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 244, in main
app.build(opts.force_all, filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/envs/latest/local/lib/python2.7/site-packages/sphinx/application.py", line 266, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 251, in build_update
'out of date' % len(to_build))
File "/home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 265, in build
self.doctreedir, self.app))
File "/home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/envs/latest/local/lib/python2.7/site-packages/sphinx/environment.py", line 622, in update
self.doc2path(config.master_doc))
SphinxError: master file /home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/checkouts/latest/contents.rst not found
Sphinx error:
master file /home/docs/checkouts/readthedocs.org/user_builds/hoodie-test/checkouts/latest/contents.rst not found
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 23
- Comments: 15 (10 by maintainers)
Commits related to this issue
- debugging rtfd/readthedocs.org#2569 — committed to gr2m/hoodie-readthedocs-test by gr2m 8 years ago
- Attempt to fix RTD build by setting master_doc I get the errror: ``` Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site... — committed to willprice/flowty by willprice 5 years ago
- Fix as per https://github.com/rtfd/readthedocs.org/issues/2569#issuecomment-485117471 — committed to SACGF/variantgrid_docs by davmlaw 5 years ago
- fix sphinx startup guide to not to fail on rtd build as per #2569 — committed to wilvk/readthedocs.org by wilvk 5 years ago
- Merge pull request #5753 from wilvk/doc_fix_newbies fix sphinx startup guide to not to fail on rtd build as per #2569 — committed to readthedocs/readthedocs.org by ericholscher 5 years ago
- Fix error https://github.com/rtfd/readthedocs.org/issues/2569 — committed to vdespa/gitlab-ci-course-notes by deleted user 5 years ago
- Set master_file in doc config per https://github.com/rtfd/readthedocs.org/issues/2569 — committed to accessibleapps/sound_lib by ctoth 5 years ago
- Fix Read The Docs (Fixes #44) https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to procrastinate-org/procrastinate by ewjoachim 5 years ago
- specify master_doc to fix the Read the Docs build As suggested by https://github.com/readthedocs/readthedocs.org/issues/2569#issuecomment-485117471 — committed to oconnor663/duct.py by oconnor663 5 years ago
- Fix error, see https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to prominence-eosc/docs-eosc by alahiff 5 years ago
- Bug: make sure rtd looks for the right index file following instructions from https://github.com/readthedocs/readthedocs.org/issues/2569#issuecomment-485117471 — committed to biosustain/Maud by teddygroves 5 years ago
- changed master file to contents see: readthedocs/readthedocs.org#2569 — committed to pypyr-scheduler/pypyr-scheduler-server by deleted user 5 years ago
- Add a missing conf According to https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to alorence/django-modern-rpc by alorence 5 years ago
- Set master_doc explicitly for venv in rtd https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to pyreiz/pyliesl by agricolab 5 years ago
- Specify master_doc = 'index' in conf.py See https://github.com/readthedocs/readthedocs.org/issues/2569#issuecomment-485117471 for more info. — committed to NCAR/geocat-examples by deleted user 5 years ago
- https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to eloquence/rtdeep by eloquence 5 years ago
- Fix bug: Sphinx error: master file [..]/checkouts/latest/contents.rst not found (https://github.com/readthedocs/readthedocs.org/issues/2569) by adding `master_doc = 'index'` in conf.py — committed to ciaochiaociao/ner_error_analysis by deleted user 5 years ago
- Try to correct this error: https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to jongablop/MinervaLab by jongablop 4 years ago
- RTD issue https://github.com/readthedocs/readthedocs.org/issues/2569#issuecomment-485117471 — committed to dnstwister/dnstwister.documentation by thisismyrobot 4 years ago
- [docs] Explicitly set the master doc To solve the error master file [...]/frankenstein/docs/contents.rst not found See https://github.com/readthedocs/readthedocs.org/issues/2569 — committed to discsim/frank by mtazzari 4 years ago
Encountered the same problem here.
I’m using sphinx 2.0.1. The generated structure by
sphinx-quickstart
command is built into html documentation successfully in my environment, while inreadthedocs.org
there occurs “contents.rst not found” error.I finally found it works by adding the following line in
conf.py
to explicitly assign the master document:I guess this issue is caused by the conflicts of the default sphinx version in readthedocs and the local environment.
I just record this solution here in case someone like me will be confused by this issue and have no idea about how to deal with it.
This doesn’t look to be a problem with RTD, so I’m going to close it. The error message states it is looking for a
contents.rst
, which doesn’t exist. If you don’t specify otherwise, Sphinx’s defaultmaster_doc
setting iscontents
. If you’d like to useindex
instead, you’ll need to create a configuration file. I suggest you first explore http://www.sphinx-doc.org/en/1.5.1/tutorial.html as you should be getting the same errors locally, it might be easier to learn Sphinx this way.Worked for me !! Thanks
You can use a
requirements.txt
file to use the same version of sphinx you use locally https://docs.readthedocs.io/en/stable/guides/specifying-dependencies.htmlCurrently, RTD installs the following packages before installing packages from the project requirements file:
I do not know why they use such old versions (
sphinx<2
for example). If I do not set versions in my requirement file, sphinx version will not be updated and I will get the errorcontents.rst not found
. In my opinion, it seems stupid.Yeah, that’s correct. You can set the
default_true
andfuture_default_true
atributes toTrue
so it’s aplied to all projects, old and future ones.btw, we already install the latest sphinx version for new projects (created after Oct 20, 2020)