由于我添加了tqdm
作为项目的依赖项,构建开始失败,错误如下:
https://readthedocs.org/projects/pychastic/builds/15291280/
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 344, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 296, in build_update
len(to_build))
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 358, in build
self.write(docnames, list(updated_docnames), method)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 532, in write
self._write_serial(sorted(docnames))
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 542, in _write_serial
self.write_doc(docname, doctree)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/builders/html/__init__.py", line 626, in write_doc
self.docwriter.write(doctree, destination)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/docutils/writers/__init__.py", line 78, in write
self.translate()
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/writers/html.py", line 71, in translate
self.document.walkabout(visitor)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 214, in walkabout
if child.walkabout(visitor):
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 214, in walkabout
if child.walkabout(visitor):
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 214, in walkabout
if child.walkabout(visitor):
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/docutils/nodes.py", line 206, in walkabout
visitor.dispatch_visit(self)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/sphinx/util/docutils.py", line 477, in dispatch_visit
method(node)
File "/home/docs/checkouts/readthedocs.org/user_builds/pychastic/envs/latest/lib/python3.7/site-packages/pydata_sphinx_theme/bootstrap_html_translator.py", line 34, in visit_table
self._table_row_index = 0
AttributeError: can't set attribute
我无法在本地复制它,这让它特别烦人。怎么回事?
问题是ReadTheDocs上Sphinx的默认版本发生了更改。
事实证明,它与一些主题包的旧版本不兼容。
在我的情况下,将requirements.txt
更改为
sphinx-book-theme==0.1.7
pydata-sphinx-theme==0.7.2
修复了问题。