I’m trying to build and publish documentation on ReadTheDocs from a github repo.
The build yields an error:
<code>Running Sphinx v7.3.7
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 0 source files that are out of date
updating environment: [new config] 0 added, 0 changed, 0 removed
reading sources...
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/cmd/build.py", line 337, in build_main
app.build(args.force_all, args.filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 351, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 293, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 313, in build
updated_docnames = set(self.read())
^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 422, in read
raise SphinxError('root file %s not found' %
sphinx.errors.SphinxError: root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
Sphinx error:
root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
</code>
<code>Running Sphinx v7.3.7
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 0 source files that are out of date
updating environment: [new config] 0 added, 0 changed, 0 removed
reading sources...
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/cmd/build.py", line 337, in build_main
app.build(args.force_all, args.filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 351, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 293, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 313, in build
updated_docnames = set(self.read())
^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 422, in read
raise SphinxError('root file %s not found' %
sphinx.errors.SphinxError: root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
Sphinx error:
root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
</code>
Running Sphinx v7.3.7
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 0 source files that are out of date
updating environment: [new config] 0 added, 0 changed, 0 removed
reading sources...
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/cmd/build.py", line 337, in build_main
app.build(args.force_all, args.filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/application.py", line 351, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 293, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 313, in build
updated_docnames = set(self.read())
^^^^^^^^^^^
File "/home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/envs/latest/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 422, in read
raise SphinxError('root file %s not found' %
sphinx.errors.SphinxError: root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
Sphinx error:
root file /home/docs/checkouts/readthedocs.org/user_builds/betterpathlib/checkouts/latest/docs/index.rst not found
I have the file .readthedocs.yaml
at project root, with these lines:
<code>...
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
</code>
<code>...
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
</code>
...
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
and in docs/conf.py
:
<code># -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'betterpathlib'
copyright = '2024, xx'
author = 'xx'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['_static']
</code>
<code># -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'betterpathlib'
copyright = '2024, xx'
author = 'xx'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['_static']
</code>
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'betterpathlib'
copyright = '2024, xx'
author = 'xx'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['_static']