gpt4 book ai didi

python - 我正在使用显示错误 : "maximum recursion depth exceeded in cmp" 的 Sphinx 文档工具

转载 作者:行者123 更新时间:2023-11-28 17:14:32 30 4
gpt4 key购买 nike

我正在使用 Sphinx 文档工具。使用 RST 文件制作 HTML 文件时,会显示以下错误并提示解决错误:

Recursion error: maximum recursion depth exceeded in cmp This can happen with very large or deeply nested source files.

You can carefully increase the default Python recursion limit of 1000 in conf.py with Example:

import sys; sys.setrecursionlimit(1500)

我已经尝试增加 sys.setrecursionlimit(),但这个解决方案没有奏效。

除此之外,我尝试更改 HTML 输出的主题。但是错误仍然存​​在;无论 HTML 主题如何。

最佳答案

我遇到了同样的问题,并尝试慢慢增加 recursionLimit,这是浪费时间(在 ~40300 开始出现段错误)。

为我解决问题的是编辑我的 index.rst

我在这样的目录树中有一个通配符

MyCodeLibrary
##############

.. toctree::
:glob:

/*

我通过这样做修复了它:

MyCodeLibrary
##############

.. toctree::
:glob:

mycodelibrary/*

希望这对您有所帮助!

关于python - 我正在使用显示错误 : "maximum recursion depth exceeded in cmp" 的 Sphinx 文档工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45139170/

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