New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sphinx error: master file [..]/checkouts/latest/contents.rst not found #2569
Comments
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 |
Encountered the same problem here. I'm using sphinx 2.0.1. The generated structure by I finally found it works by adding the following line in master_doc = 'index' 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. |
You can use a |
I get the errror: ``` Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main app.build(args.force_all, filenames) File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 341, in build self.builder.build_update() File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 347, in build_update len(to_build)) File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 360, in build updated_docnames = set(self.read()) File "/home/docs/checkouts/readthedocs.org/user_builds/flowty/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 472, in read self.env.doc2path(self.config.master_doc)) sphinx.errors.SphinxError: master file /home/docs/checkouts/readthedocs.org/user_builds/flowty/checkouts/latest/docs/source/contents.rst not found Sphinx error: master file /home/docs/checkouts/readthedocs.org/user_builds/flowty/checkouts/latest/docs/source/contents.rst not found ``` See readthedocs/readthedocs.org#2569
Worked for me !! Thanks |
fix sphinx startup guide to not to fail on rtd build as per #2569
I have been struggling with this issue for hours. thank you for sharing the answer. |
Currently, RTD installs the following packages before installing packages from the project requirements file:
I do not know why they use such old versions ( |
following instructions from readthedocs/readthedocs.org#2569 (comment)
According to readthedocs/readthedocs.org#2569
This fixes a build error, wherein rtd was looking for contents.rst. More detail, and the fix, at readthedocs/readthedocs.org#2569
- Fixed this readthedocs/readthedocs.org#2569 error in ReadTheDocs
readthedocs.org expects contents.rst which is different from what we get locally. readthedocs/readthedocs.org#2569
readthedocs/readthedocs.org#2569 says it should also fail locally if it fails on RTD, but it works locally. However, orther commenters suggest adding master_doc = 'index' to the conf.py file.
readthedocs/readthedocs.org#2569 says it should also fail locally if it fails on RTD, but it works locally. However, orther commenters suggest adding master_doc = 'index' to the conf.py file.
readthedocs/readthedocs.org#2569 says it should also fail locally if it fails on RTD, but it works locally. However, orther commenters suggest adding master_doc = 'index' to the conf.py file.
The confusion is well-stated by @adamj-codethink:
The instructions are fine. The But Read the Docs uses Sphinx 1.8.5 by default and since Having just onboarded a new user to Read the Docs, this problem came up again: Following standard documentation will land a broken Read the Docs project. Judging from the activity in this thread, it's a problem to many people. For instance the above comment:
Solutions?User has to fix it: Either the user has to add Read the Docs fixing it: We can expect that people are now following guides with the latest version of Sphinx installed locally.
Any further thoughts on this? |
We are already onboard with this solution. @stsewd already created a PR with the new proposed policy for these external dependencies that Read the Docs relies on, and mentioned that RTD should always install the latest Sphinx version: https://github.com/readthedocs/readthedocs.org/pull/7859/files#diff-1d854732c488780cf89b325277dd80220a7e541647ccf1c18bdc372eb7b1a4d6R71 |
btw, we already install the latest sphinx version for new projects (created after Oct 20, 2020) |
It sounds great that the latest stable version of Sphinx will always be supported and is used for newer projects, that would fix this issue once and for all. Can the Sphinx version pinned in readthedocs.org/requirements/pip.txt Lines 13 to 16 in 29c2360
|
@benjaminp that dependency is for our intersphinx integration readthedocs.org/readthedocs/projects/tasks.py Line 1365 in 29c2360
|
Thank you @stsewd - I understand now that this is controlled by the Feature flag readthedocs.org/readthedocs/projects/models.py Line 1591 in 3efaa7b
I think self-hosted deployments have to define the feature flag default themselves in order to avoid this issue? |
Yeah, that's correct. You can set the |
sphinx.errors.SphinxError: master file /home/docs/checkouts/readthedocs.org/user_builds/pyrtl/checkouts/latest/docs/contents.rst not found See readthedocs/readthedocs.org#2569
master_doc = 'source/index' |
Before this patch, the configuration file for the Sphinx documentation had a workaround for an issue that's no longer present with the version of Sphinx that comes with anod. This patch removes that workaround. The fact that the issue has been fixed upstream can be checked by browsing the following GitHub issue: readthedocs/readthedocs.org#2569
Sphinx error: root file /home/docs/checkouts/readthedocs.org/user_builds/iso6346-containers/checkouts/latest/docs/source/index.rst not found https://stackoverflow.com/questions/56336234/build-fail-sphinx-error-contents-rst-not-found readthedocs/readthedocs.org#2569
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
Expected Result
I expected a new version of docs to be built at http://hoodie-test.readthedocs.io/en/latest/
Actual Result
The text was updated successfully, but these errors were encountered: