Skip to content

[docutils 0.13.1] assert not self.context #3212

@tardyp

Description

@tardyp

Following traceback is found when building buildbot documentation after upgrade to docutils 0.13.1

Traceback (most recent call last):
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/cmdline.py", line 296, in main
    app.build(opts.force_all, filenames)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/application.py", line 333, in build
    self.builder.build_update()
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 322, in build
    self.write(docnames, list(updated_docnames), method)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 360, in write
    self._write_serial(sorted(docnames), warnings)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 368, in _write_serial
    self.write_doc(docname, doctree)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/builders/html.py", line 452, in write_doc
    self.docwriter.write(doctree, destination)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/docutils/writers/__init__.py", line 80, in write
    self.translate()
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/sphinx/writers/html.py", line 48, in translate
    self.document.walkabout(visitor)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/docutils/nodes.py", line 187, in walkabout
    visitor.dispatch_departure(self)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/docutils/nodes.py", line 1895, in dispatch_departure
    return method(node)
  File "/Users/ptardy/dev/bb/buildbot/sandbox/lib/python2.7/site-packages/docutils/writers/_html_base.py", line 671, in depart_document
    assert not self.context, 'len(context) = %s' % len(self.context)
AssertionError: len(context) = 4

You can reproduce by downloading a copy of buildbot

git clone git@github.com:buildbot/buildbot.git
cd buildbot
pip install -e ./master[docs]'
make docs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions