Issue #581 resolved

role with empy target -> TypeError: 'NoneType' object is unsubscriptable

Jakub Wilk
created an issue

This snippet {{{ :func:len <> }}} makes Sphinx 1.0.5 produce the following backtrace: {{{ Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/sphinx/", line 173, in main, filenames) File "/usr/lib/pymodules/python2.6/sphinx/", line 207, in build self.builder.build_update() File "/usr/lib/pymodules/python2.6/sphinx/builders/", line 198, in build_update 'out of date' % len(to_build)) File "/usr/lib/pymodules/python2.6/sphinx/builders/", line 254, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib/pymodules/python2.6/sphinx/builders/", line 292, in write doctree = self.env.get_and_resolve_doctree(docname, self) File "/usr/lib/pymodules/python2.6/sphinx/", line 1104, in get_and_resolve_doctree self.resolve_references(doctree, docname, builder) File "/usr/lib/pymodules/python2.6/sphinx/", line 1310, in resolve_references typ, target, node, contnode) File "/usr/lib/pymodules/python2.6/sphinx/domains/", line 649, in resolve_xref ', '.join(match[0] for match in matches)), File "/usr/lib/pymodules/python2.6/sphinx/domains/", line 649, in <genexpr> ', '.join(match[0] for match in matches)), TypeError: 'NoneType' object is unsubscriptable }}} While this is of course a user error: it used to work with Sphinx 0.6; a better error message would be nice.

Comments (2)

  1. Log in to comment