Issues

Issue #1160 resolved

citation target missing → AssertionError: Losing "ids" attribute: ['id1']

Jakub Wilk
created an issue

If a citation target is missing (see the attached test-case), Sphinx dies with the following traceback:

# Sphinx version: 1.2pre/be775587dc16
# Python version: 2.7.3
# Docutils version: 0.8.1 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/home/jwilk/sphinx/sphinx/cmdline.py", line 198, in main
    app.build(force_all, filenames)
  File "/home/jwilk/sphinx/sphinx/application.py", line 204, in build
    self.builder.build_update()
  File "/home/jwilk/sphinx/sphinx/builders/__init__.py", line 196, in build_update
    'out of date' % len(to_build))
  File "/home/jwilk/sphinx/sphinx/builders/__init__.py", line 252, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/jwilk/sphinx/sphinx/builders/__init__.py", line 291, in write
    doctree = self.env.get_and_resolve_doctree(docname, self)
  File "/home/jwilk/sphinx/sphinx/environment.py", line 1294, in get_and_resolve_doctree
    self.resolve_references(doctree, docname, builder)
  File "/home/jwilk/sphinx/sphinx/environment.py", line 1544, in resolve_references
    node.replace_self(newnode or contnode)
  File "/usr/lib/pymodules/python2.7/docutils/nodes.py", line 692, in replace_self
    'Losing "%s" attribute: %s' % (att, self[att])
AssertionError: Losing "ids" attribute: ['id1']

hg bisect tells me that be775587dc16 is the changeset that introduced this bug.

Comments (5)

  1. Log in to comment