On 13.04.2017 12:42, Mauro Carvalho Chehab wrote:
The default recursion limit is not good enough to handle complex books. I'm sometimes receiving this error message: sphinx.errors.SphinxParallelError: RecursionError: maximum recursion depth exceeded while pickling an object or those: maximum recursion depth exceeded while calling a Python object 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 e.g.: import sys; sys.setrecursionlimit(1500)
Is this behavior reproducible? I also observed those errors in the past. But mostly, it turned out that I was the problem ;) Sphinx caches the doctree (they call it "pickling"). On re-compile, this cached doctree is readed in and changes from the rst-files are merged into this doctree. After, the "updated" doctree is pickled (cached) again. This procedere is fragil in some circumstances. E.g. Sphinx parses every rst-file in Documents/ and below (every! not only those files refered in toctrees), if you have some C&P corpses with rst-files in ... its all parsed into the doctree and merged and pickled again. E.g. re-compiling on a shares without a clean before, while different Sphinx versions are installed on your hosts using this share. (IMO merging the cached doctree with changes from rst-files is not stable over Sphinx versions).
Increase it.
I recomend to increase the recusion-limit only, if we have a reproducible scenario. -- Markus --
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> --- Documentation/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/conf.py b/Documentation/conf.py index 45a0741b39ed..ff5a5979f5d5 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -19,6 +19,7 @@ import sphinx # Get Sphinx version major, minor, patch = sphinx.version_info[:3] +sys.setrecursionlimit(5000) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the
-- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html