Open andreacassioli opened 10 years ago
Same error here. Here is the contents of the log file:
# Sphinx version: 1.2.2
# Python version: 2.7.8
# Docutils version: 0.12 release
# Jinja2 version: 2.7.2
# Loaded extensions:
# sphinx.ext.todo from /usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/ext/todo.pyc
# clatex_builder from /home/legoff/Downloads/sphinx_latex/clatex_builder.pyc
# sphinx.ext.oldcmarkup from /usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/ext/oldcmarkup.pyc
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/cmdline.py", line 254, in main
app.build(force_all, filenames)
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/application.py", line 212, in build
self.builder.build_update()
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/builders/__init__.py", line 209, in build_update
self.build(['__all__'], to_build)
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/builders/__init__.py", line 276, in build
self.write(docnames, list(updated_docnames), method)
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/builders/latex.py", line 105, in write
docwriter.write(doctree, destination)
File "/usr/lib/python2.7/dist-packages/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/writers/latex.py", line 95, in translate
self.document.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/docutils/nodes.py", line 1882, in dispatch_visit
return method(node)
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.2.2-py2.7.egg/sphinx/writers/latex.py", line 363, in visit_document
self.body.append(BEGIN_DOC % self.elements)
KeyError: 'begin_doc'
This happens when invoking sphinxbuild with latex builder. Apparently because BEGIN_DOC is redefined by the extension whereas it should not (I guess).
Note for andreacassioli: in order to use the extension you have to invoke sphinxbuild with the builder created by the extension which is called: clatex.
Nevertheless problems remain: the instantiation of this builder "shadows" the latex environment created from handling tip, warning, etc. I get this error with clatex:
! LaTeX Error: Environment notice undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.113 \begin{notice}
{note}{Todo}
I am compiling a fairly large Sphinx documentation with latex and I got this error
Exception occurred: File "/usr/local/lib/python2.7/dist-packages/sphinx/writers/latex.py", line 363, in visit_document self.body.append(BEGIN_DOC % self.elements) KeyError: 'begin_doc' The full traceback has been saved in /tmp/sphinx-err-MCa61D.log, if you want to report the issue to the developers.
any ideas?