gpt4 book ai didi

python-sphinx - 我在阅读文档上构建项目时遇到问题

转载 作者:行者123 更新时间:2023-12-03 01:39:04 25 4
gpt4 key购买 nike

使用 sphinx-quickstart 创建了 sphinx 项目。运行“make html”并且没有产生错误。将所有代码推送到 GitHub。我尝试在阅读文档上导入和构建项目,但出现以下错误。我在使用 Mac 时没有遇到任何问题 - 它在阅读文档上构建并呈现代码。这次我使用的是 Windows 10。

Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/thirddocs/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/thirddocs/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/thirddocs/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/thirddocs/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/thirddocs/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/thirddocs/checkouts/latest/contents.rst not found

Sphinx error:
master file /home/docs/checkouts/readthedocs.org/user_builds/thirddocs/checkouts/latest/contents.rst not found

最佳答案

只需将 master_doc = 'index' 添加到 conf.py 文件即可。

关于python-sphinx - 我在阅读文档上构建项目时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55911648/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com