[Python-modules-team] Bug#754408: [python-sphinx] TODO extension not compatible with websupport
Slavko
linux at slavino.sk
Thu Jul 10 18:36:15 UTC 2014
Package: python-sphinx
Version: 1.2.2+dfsg-2
Severity: normal
Hi,
by playing with the sphinx's websupport i go to problems with this
excpetion:
...
pickling environment... done
checking consistency... done
preparing documents... done
Traceback (most recent call last):
File "websupport.py", line 34, in <module>
support.build()
File "/usr/lib/python2.7/dist-packages/sphinx/websupport/__init__.py", line 127, in build
app.build()
File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 212, in build
self.builder.build_update()
File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 214, in build_update
'out of date' % len(to_build))
File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 276, in build
self.write(docnames, list(updated_docnames), method)
File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 320, in write
self._write_serial(sorted(docnames), warnings)
File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 333, in _write_serial
self.write_doc(docname, doctree)
File "/usr/lib/python2.7/dist-packages/sphinx/builders/websupport.py", line 63, in write_doc
self.docwriter.write(doctree, destination)
File "/usr/lib/python2.7/dist-packages/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/usr/lib/python2.7/dist-packages/sphinx/writers/html.py", line 51, in translate
self.document.walkabout(visitor)
File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 166, in walkabout
visitor.dispatch_visit(self)
File "/usr/lib/python2.7/dist-packages/sphinx/writers/websupport.py", line 27, in dispatch_visit
self.handle_visit_commentable(node)
File "/usr/lib/python2.7/dist-packages/sphinx/writers/websupport.py", line 34, in handle_visit_commentable
self.add_db_node(node)
File "/usr/lib/python2.7/dist-packages/sphinx/writers/websupport.py", line 43, in add_db_node
if not storage.has_node(node.uid):
AttributeError: 'paragraph' object has no attribute 'uid'
The websupport is implemented by very basic way:
from sphinx.websupport import WebSupport
support = WebSupport(srcdir="path to source dir",
builddir="path to build dir",
search="whoosh"
)
support.build()
After some investigation i find (and confirmed on new empty project),
that this is caused by the TODO extension, more precisely by the
"todolist" directive, but only if at least one "todo" directive exist.
Without any "todo" directive or without "todolist" directive or with the
"todo_include_todos = False" (the default one) all works as expected.
regards
--- System information. ---
Architecture: amd64
Kernel: Linux 3.14-1-amd64
Debian Release: jessie/sid
500 testing ftp.sk.debian.org
--- Package information. ---
Depends (Version) | Installed
====================================-+-=================
python:any (>= 2.7.5-5~) |
python-docutils (>= 0.7) | 0.11-3
python-pygments (>= 1.2) | 1.6+dfsg-1
python-jinja2 (>= 2.3) | 2.7.3-1
python:any (<< 2.8) |
sphinx-common (= 1.2.2+dfsg-2) | 1.2.2+dfsg-2
Recommends (Version) | Installed
================================-+-===========
python (>= 2.6) | 2.7.6-2
OR python-simplejson | 3.5.3-1
python-pil | 2.4.0-2
sphinx-doc |
Suggests (Version) | Installed
========================================-+-===========
jsmath | 3.6e-1
libjs-mathjax | 2.4-1
dvipng | 1.14-2
texlive-latex-recommended | 2014.20140626-1
texlive-latex-extra | 2014.20140626-1
texlive-fonts-recommended | 2014.20140626-1
--
Slavko
http://slavino.sk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20140710/3da9f6c7/attachment.sig>
More information about the Python-modules-team
mailing list