admin管理员组文章数量:1302868
I am struggling to get my documentation built on readthedocs. Locally, everything works fine, but there seems to be something wrong with my .readthedocs.yaml file:
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
sphinx:
configuration: conf.py
output_dir: $READTHEDOCS_OUTPUT/html
formats:
- pdf
- epub
- htmlzip
python:
install:
- requirements: requirements.txt
The build fails with the message:
Error
Make sure the key name sphinx.output_dir
is correct.
If I try to comment the output_dir: $READTHEDOCS_OUTPUT/html
line, in the hope that readthedocs figures out the output directory automatically, the build fails with the message:
Error
Some files were detected in an unsupported output path: _build/html
. Ensure your project is configured to use the output path $READTHEDOCS_OUTPUT/html
Any suggestions? (the git repository for the documents can be found at )
I am struggling to get my documentation built on readthedocs. Locally, everything works fine, but there seems to be something wrong with my .readthedocs.yaml file:
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
sphinx:
configuration: conf.py
output_dir: $READTHEDOCS_OUTPUT/html
formats:
- pdf
- epub
- htmlzip
python:
install:
- requirements: requirements.txt
The build fails with the message:
Error
Make sure the key name sphinx.output_dir
is correct.
If I try to comment the output_dir: $READTHEDOCS_OUTPUT/html
line, in the hope that readthedocs figures out the output directory automatically, the build fails with the message:
Error
Some files were detected in an unsupported output path: _build/html
. Ensure your project is configured to use the output path $READTHEDOCS_OUTPUT/html
Any suggestions? (the git repository for the documents can be found at https://github/andremano/GIS-4-Land-Administration)
Share Improve this question edited Feb 5 at 7:17 mzjn 51.1k15 gold badges134 silver badges260 bronze badges asked Feb 4 at 22:26 LisdengardLisdengard 1397 bronze badges 7 | Show 2 more comments1 Answer
Reset to default 0Thank you everyone for the time and suggestions you took with this question.
It appears this problem came from the Sphinx version used during the first build.The documents were built using Sphinx 4.X back in 2020 or so.
I knew this, so I upgraded my Sphinx before trying to publish my updated documents into readthedocs. I believe here is where the problem lies, although I cannot pinpoint precisely where/why, but it may be the case that the the structure and elements of Sphinx 4.X are not fully supported/ported to the latest Sphinx version.
Long Story short, I simply rebuilt my documentation from scratch by running a sphinx-quickstart
in a new folder and then copying the documentation .rst
files and configurations into the new folder.
本文标签:
版权声明:本文标题:read the docs - readthedocs: "ERROR Make sure the key name sphinx.output_dir is correct" (documentation build 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741743282a2395382.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
output_dir
is not a valid key. See docs.readthedocs/platform/stable/config-file/v2.html#sphinx. Delete the line. – Steve Piercy Commented Feb 5 at 7:07