Package: rst2pdf
Version: 0.14.2-1
Severity: normal
Hi,
I don't know if this is a bug in rst2pdf or docutils, but I was running rst2pdf.
It would be good if it handled this situation, rather then backtracing:
rst2pdf kgoetz-cv.rst
kgoetz-cv.rst:141: (SEVERE/4) Title level inconsistent:
::
..
Traceback (most recent call last):
File "/usr/bin/rst2pdf", line 9, in <module>
load_entry_point('rst2pdf==0.14.2', 'console_scripts', 'rst2pdf')()
File "/usr/lib/pymodules/python2.6/rst2pdf/createpdf.py", line 1218, in main
compressed=options.compressed)
File "/usr/lib/pymodules/python2.6/rst2pdf/createpdf.py", line 477, in
createPdf
settings_overrides=settings_overrides)
File "/usr/lib/pymodules/python2.6/docutils/core.py", line 458, in
publish_doctree
output = pub.publish(enable_exit_status=enable_exit_status)
File "/usr/lib/pymodules/python2.6/docutils/core.py", line 203, in publish
self.settings)
File "/usr/lib/pymodules/python2.6/docutils/readers/__init__.py", line 69, in
read
self.parse()
File "/usr/lib/pymodules/python2.6/docutils/readers/__init__.py", line 75, in
parse
self.parser.parse(self.input, document)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/__init__.py", line
157, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 170,
in run
input_source=document['source'])
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 233, in run
context, state, transitions)
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 454, in
check_line
return method(match, context, next_state)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line
2940, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 329,
in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 398,
in new_subsection
node=section_node, match_titles=1)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 284,
in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 195,
in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 233, in run
context, state, transitions)
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 454, in
check_line
return method(match, context, next_state)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line
2706, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 329,
in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 398,
in new_subsection
node=section_node, match_titles=1)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 284,
in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 195,
in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 233, in run
context, state, transitions)
File "/usr/lib/pymodules/python2.6/docutils/statemachine.py", line 454, in
check_line
return method(match, context, next_state)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line
2706, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 328,
in section
if self.check_subsection(source, style, lineno):
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 357,
in check_subsection
self.parent += self.title_inconsistent(source, lineno)
File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 376,
in title_inconsistent
source=src, line=srcline)
File "/usr/lib/pymodules/python2.6/docutils/utils.py", line 245, in severe
return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)
File "/usr/lib/pymodules/python2.6/docutils/utils.py", line 203, in
system_message
raise SystemMessage(msg, level)
docutils.utils.SystemMessage: kgoetz-cv.rst:141: (SEVERE/4) Title level
inconsistent:
::
..
The shortest test i could produce for this was the following:
========
testing
========
big heading
===========
heading
-------
text here
big heading
===========
::
..
a set of text for testing
Interestingly, taking out 'heading' from above 'text here' produces a very
similar error to the one above.
thanks,
kk
-- System Information:
Debian Release: 6.0.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages rst2pdf depends on:
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python-docutils 0.7-2 utilities for the documentation of
ii python-pkg-resources 0.6.14-4 Package Discovery and Resource Acc
ii python-pygments 1.3.1+dfsg-1 syntax highlighting package writte
ii python-reportlab 2.4-4 ReportLab library to create PDF do
ii python-setuptools 0.6.14-4 Python Distutils Enhancements (set
ii python-simplejson 2.1.1-1 simple, fast, extensible JSON enco
ii python-support 1.0.10 automated rebuilding support for P
rst2pdf recommends no packages.
Versions of packages rst2pdf suggests:
pn python-aafigure <none> (no description available)
ii python-imaging 1.1.7-2 Python Imaging Library
pn python-matplotlib <none> (no description available)
pn python-sphinx <none> (no description available)
pn python-uniconvertor <none> (no description available)
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]