Problem when using sphinx web support and blockdiag

Takafumi Arakaki avatarTakafumi Arakaki created an issue

I get the following error when trying to build sphinx web support and having blockdiag figure in the document.

Traceback (most recent call last):
  File "web-build.py", line 9, in <module>
    support.build()
  File "**/lib/python2.6/site-packages/sphinx/websupport/__init__.py", line 126, in build
    app.build()
  File "**/lib/python2.6/site-packages/sphinx/application.py", line 204, in build
    self.builder.build_update()
  File "**/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 196, in build_update
    'out of date' % len(to_build))
  File "**/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 252, in build
    self.write(docnames, list(updated_docnames), method)
  File "**/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 292, in write
    self.write_doc(docname, doctree)
  File "**/lib/python2.6/site-packages/sphinx/builders/websupport.py", line 62, in write_doc
    self.post_process_images(doctree)
  File "**/lib/python2.6/site-packages/sphinx/builders/html.py", line 611, in post_process_images
    Builder.post_process_images(self, doctree)
  File "**/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 134, in post_process_images
    if '?' in node['candidates']:
  File "**/lib/python2.6/site-packages/docutils/nodes.py", line 534, in __getitem__
    return self.attributes[key]
KeyError: 'candidates'

I am using:

  • sphinx: 1.1.2
  • sphinxcontrib-blockdiag: 1.0.1
  • docutils:0.8.1

See the minimum example I made: https://bitbucket.org/tkf/simple-blockdiag/src

This is how to run the build:

rm -rf build
python web-build.py
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.