Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Recursion error" when building documentation with Sphinx >= 2.1 #66

Open
ajoaoff opened this issue Jun 28, 2021 · 0 comments
Open

"Recursion error" when building documentation with Sphinx >= 2.1 #66

ajoaoff opened this issue Jun 28, 2021 · 0 comments
Labels

Comments

@ajoaoff
Copy link

ajoaoff commented Jun 28, 2021

Original issue opened by @hdiogenes at kytos#595.

$ make -C docs/ default doctest
make clean
rm -rf pyof.*
rm -rf _build/*
make dirhtml
sphinx-apidoc -o . ../pyof/ -d10 -M -T
Creating file ./pyof.rst.
Creating file ./pyof.foundation.rst.
Creating file ./pyof.v0x01.rst.
Creating file ./pyof.v0x01.asynchronous.rst.
Creating file ./pyof.v0x01.common.rst.
Creating file ./pyof.v0x01.controller2switch.rst.
Creating file ./pyof.v0x01.symmetric.rst.
Creating file ./pyof.v0x04.rst.
Creating file ./pyof.v0x04.asynchronous.rst.
Creating file ./pyof.v0x04.common.rst.
Creating file ./pyof.v0x04.controller2switch.rst.
Creating file ./pyof.v0x04.symmetric.rst.
#sed -i "/Submodules/,+1d" *.rst
#sed -i "/Subpackages/,+1d" *.rst
sphinx-build -b dirhtml -d _build/doctrees  -W . _build/dirhtml
Running Sphinx v2.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [dirhtml]: targets for 19 source files that are out of date
updating environment: 19 added, 0 changed, 0 removed
reading sources... [ 42%] pyof.foundation
Recursion error:
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)
make[1]: *** [dirhtml] Error 2
make: *** [default] Error 2

Older versions work:

$ pip install -U 'sphinx<2.1'
$ make -C docs/ default doctest
...
build succeeded.
@ajoaoff ajoaoff added the doc label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant