Hi All
We are using Sphinx version 3.1.2 and version 1.7.6 in 2 different services, and since today we have had errors when we try to build the documentation of those projects.
This is the error:
Exception occurred:
File "/codebuild/output/src746283639/src/.python/lib/python3.8/site-packages/docutils/writers/html5_polyglot/init.py", line 445, in section_title_tags
if (ids and self.settings.section_self_link
AttributeError: 'Values' object has no attribute 'section_self_link'
The issues are solved when we directly add the previous version of 'docutils' (0.17) to our docs requirements.
Any help will be much appreciated.
Thanks, Lital
I am very sorry that we broke your build system
for sphinx you should pin docutils <= 0.17 (as far as I understood sphinx-dev mails)
did both versions report the same error ?
could you send (me) more backtrace ?
FYI: I applied this patch to Sphinx to support docutils-0.18 (not released yet).
https://github.com/sphinx-doc/sphinx/commit/c97c488bb6baad2cd2e76615dbff448286052544
I think this must be a bug of Sphinx, not a docutils.
To realize the cross-reference feature, Sphinx processes the target
document twice. In the process,
we need to fill some configuration to the settings object before
building the document.
Thanks,
Takeshi KOMIYA
Last edit: Günter Milde 2021-10-30
should
a) docutils check for correctly set up parameters
b) give a list of required parameters
or generally should some functionality be moved into docutils ?
Hi
If I'm directly adding the docutils==0.17 to the requirements file everything works fine as before, this is our temporary solution for now.
The error reported from the Sphinx==3.1.2 is:
Exception occurred:
File "/codebuild/output/src746283639/src/.python/lib/python3.8/site-packages/docutils/writers/html5_polyglot/init.py", line 445, in section_title_tags
if (ids and self.settings.section_self_link
AttributeError: 'Values' object has no attribute 'section_self_link'
The full traceback has been saved in /tmp/sphinx-err-k_3ee6i6.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!
The error reported from the Sphinx==1.7.6 is:
Exception occurred:
File "/codebuild/output/src218256092/src/.python/lib/python3.8/site-packages/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-j2wthm6i.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!
Thanks a lot for your help
Lital
Last edit: Günter Milde 2021-10-30
actually 0.17 is replaced by 0.17.1 and sphinx uses docutils<0.18
all the best
Last edit: Günter Milde 2021-10-30
Since version 3.5.4, Sphinx pins the Docutils dependency to tested versions:
Sphinx-3.5.4 depends on docutils < 0.17,
Sphinx 4.1 depend on docutils < 0.18.
Users of older Sphinx versions need to add similar pins in their setup files.
Users with non-standard Sphinx extensions may need to add an explicit dependency, too.
Pinning to a minor version like
docutils <0.18instead ofdocutils == 0.17allows bugfix releases like Docutils 0.17.1.Last edit: Günter Milde 2021-11-02
Thank you for checking this.
Last edit: Günter Milde 2021-11-02
For possible resolutions, see the Sphinx feature request
https://github.com/sphinx-doc/sphinx/issues/9807.
r8885 restores the backwards compatibility of nodes.Node.traverse().
The new method nodes.Node.findall() returns an iterator for fast and memory efficient looping.
Sphinx versions 1.x should work as before.
Sphinx >= 2.0 defaults to the provisional "html5" writer: CSS style sheets may require adaption to changed output (more semantic and accessible HTML).
Thanks for the feedback and sorry for the troubles.
Fixed in Docutils 0.18.1.