-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
TypeError: 'generator' object is not reversible #9727
Comments
Have this error as well. Running Sphinx v1.8.5 Traceback (most recent call last): Exception occurred: |
I encountered this in my own way. Check your version of docutils thats being utilized here. There was a recent docutils-0.18 release that made a note of this change: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26
Pinning |
This breaks readthedocs build for me. https://readthedocs.org/projects/aioftp/builds/15099286/ |
Hi @pohmelie , Juan Luis from Read the Docs here - that's to be expected, pin your docutils version to |
Pinning docutils to <0.18 works!!! Thanks everyone! |
Shouldn't Sphinx change its own requirements to include |
@JohnPaton, actually it is already in https://github.com/sphinx-doc/sphinx/blob/4.x/setup.py#L26 |
Fix for rtd (see this [bug](sphinx-doc/sphinx#9727)
thanks you for your replies. pin
as reported by @astrojuanlu I followed this instruction and it works! Build succes |
The recommended way is upgrading Sphinx to the latest one. It has already pinned the version of docutils. I think no reason to keep using the old version of Sphinx. Let's upgrade! |
Just to expand on why this is happening in the first place, if you have an RTD project that was created prior to October 2020, RTD will default to And, Line 26 in 2be9d6b
So, you'll want to specify the version of |
Just FYI, the line was added at v4.0. So docutils-0.18 would be installed if you're using Sphinx < 4.0. |
I should mention, that our invocations of sphinx have been warning us about this issue for a while:
While docutils didn't make this switch until 0.18, it is a reminder that we should pay attention to warnings. |
…p CI]. This resolves the build problems due to sphinx-doc/sphinx#9727 we've been seeing.
This is done, so we get the required version of docutils. This is needed because we need a version greater than 0.18. Source: sphinx-doc/sphinx#9727 (comment)
This resolves the build problems due to sphinx-doc/sphinx#9727 we've been seeing. RTD seems to by default run a <sphinx-2.0 which conflicts with newer docutils. Since we usually install sphinx from the system for building the docs instead pin docutils in the docs requirements file which is parsed by RTD.
This is done, so we get the required version of docutils. This is needed because we need a version greater than 0.18. Source: sphinx-doc/sphinx#9727 (comment)
This resolves the build problems due to sphinx-doc/sphinx#9727 we've been seeing. RTD seems to by default run a <sphinx-2.0 which conflicts with newer docutils. Since we usually install sphinx from the system for building the docs instead pin docutils in the docs requirements file which is parsed by RTD.
RTD documentation were failing since about two weeks, related to sphinx-doc/sphinx#9727. RTD does by default keep sphinx at version < 2 for existing projects. Older versions of sphinx do no define their version dependency on docutils. docutils, in turn, was recently updated breaking compatibility with sphinx. This change cleans up the dependencies of the RTD build, updating and pinning the versions of the dependencies. This should make the documentation builds stable and reproducible.
RTD documentation were failing since about two weeks, related to sphinx-doc/sphinx#9727. RTD does by default keep sphinx at version < 2 for existing projects. Older versions of sphinx do no define their version dependency on docutils. docutils, in turn, was recently updated breaking compatibility with sphinx. This change cleans up the dependencies of the RTD build, updating and pinning the versions of the dependencies. This should make the documentation builds stable and reproducible.
…ersion at <0.18 to work around issue : sphinx-doc/sphinx#9727 Sphinx is incompatible with the new docutils package.
Describe the bug
My cmd:
/usr/local/bin/sphinx-build -b man -t man -d /root/bu/ceph/build/doc/doctrees -c /root/bu/ceph/man /root/bu/ceph/doc/man /root/bu/ceph/build/doc/man
Error Message:
Running Sphinx v1.7.6
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: 46 added, 0 changed, 0 removed
reading sources... [ 2%] 8/ceph
reading sources... [ 4%] 8/ceph-authtool
reading sources... [ 6%] 8/ceph-bluestore-tool
Exception occurred:
File "/usr/local/Python-3.6.15/lib/python3.6/site-packages/Sphinx-1.7.6.dev20211011-py3.6.egg/sphinx/util/nodes.py", line 57, in apply_source_workaround
for classifier in reversed(node.parent.traverse(nodes.classifier)):
TypeError: 'generator' object is not reversible
The full traceback has been saved in /tmp/sphinx-err-jpnnyy28.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!
How to Reproduce
I download the sphinx from https://github.com/sphinx-doc/sphinx.
And build it with "python3 setup.py install".
Expected behavior
No response
Your project
https://github.com/ceph/ceph
Screenshots
No response
OS
CentOS Linux release 7.9.2009 (Core)
Python version
Python 3.6.15
Sphinx version
sphinx-1.7.6.tar.gz
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: