gpt4 book ai didi

python-sphinx - 构建 HTML 文件时文件名太长错误

转载 作者:行者123 更新时间:2023-12-04 17:29:38 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 18.04 上构建 HTML 文档,但是当我运行 make html 时遇到了一个奇怪的错误:

Exception occurred:


File "/home/cybo/.local/lib/python3.6/site-packages/nbsphinx.py", line 917, in parse
with open(dest, 'wb') as f:
OSError: [Errno 36] File name too long: '/home/cybo/Desktop/repositories/h2oai/docs/_build/doctrees/nbsphinx/_build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx__build_doctrees_nbsphinx_examples_autoviz_client_example_autoviz_client_example_11_1.png'

我可以通过删除这些文件夹来修复错误,但它们又被创建了:
reading sources... [ 44%] _build/html/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/examples/autoviz_client_example/autoviz_c

希望得到任何帮助,似乎是某种循环引用错误,我不确定如何解决。

最佳答案

我在使用 nbsphinx 时遇到了同样的错误.问题是我忽略了设置 exclude_patterns在我的 conf.py并且每个连续的构建都为 _build 中的所有内容创建了一个 HTML 文件。 .这意味着每次构建都比前一个构建慢。什么样的恶梦!

我通过将以下内容放入我的 conf.py 中来修复它:

extensions = [
'nbsphinx',
'sphinx.ext.mathjax',
]
exclude_patterns = ['_build', '**.ipynb_checkpoints']

我最初在 nbsphinx instructions 中找到了此信息.希望能帮助到你!

关于python-sphinx - 构建 HTML 文件时文件名太长错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60964777/

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