Issue #1364 resolved

'make gettext' fails when the '.. todolist::' directive is present.

created an issue

There's some kind of incompatibility/regression in 1.2.1 with the 'todo' extension and the internationalisation functionality. I get the following stack trace when attempting to build the .po files when the output generator hits a '.. todolist::' directive. This bug doesn't seem to affect 1.1.3.

vagrant@precise64:/vagrant/fresh$ cat /tmp/sphinx-err-PyS6A7.log 
# Sphinx version: 1.2.1
# Python version: 2.7.3
# Docutils version: 0.11 release
# Jinja2 version: 2.7.2
# Loaded extensions:
#   sphinx.ext.todo from /vagrant/env/local/lib/python2.7/site-packages/sphinx/ext/todo.pyc
#   sphinx.ext.oldcmarkup from /vagrant/env/local/lib/python2.7/site-packages/sphinx/ext/oldcmarkup.pyc
Traceback (most recent call last):
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/", line 254, in main, filenames)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/", line 212, in build
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 214, in build_update
    'out of date' % len(to_build))
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 174, in build, docnames, summary, method)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 276, in build
    self.write(docnames, list(updated_docnames), method)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 320, in write
    self._write_serial(sorted(docnames), warnings)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 333, in _write_serial
    self.write_doc(docname, doctree)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 101, in write_doc
    catalog.add(msg, node)
  File "/vagrant/env/local/lib/python2.7/site-packages/sphinx/builders/", line 62, in add
    self.metadata[msg].append((origin.source, origin.line, origin.uid))
AttributeError: 'title' object has no attribute 'uid'

Comments (5)

  1. Takayuki Shimizukawa

    Fix 'make gettext' fails when the '.. todolist::' directive is present. Closes #1364

    Nodes that are replicated like todo don't have a uid, however i18n also unnecessary. If extensions need to choose i18n for the extended nodes or not, we need another approach.

    → <<cset 4124412bef4a>>

  2. Log in to comment