Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#157 Line block parsing doesn't like system message -> traceback

sandbox
closed-fixed
nobody
None
5
2013-03-22
2011-01-03
Georg Brandl
No

(originally from https://bitbucket.org/birkenfeld/sphinx/issue/533/\)

When a system message (e.g. for a duplicate target) occurs in a line block, a traceback is caused. Example reST source:

Publications

| Hoyt Koepke. Paper 1.
| [`pdf <_static/paper-1.pdf>`_ ]

| Hoyt Koepke. Paper 2.
| [`pdf <_static/paper-2.pdf>`_ ]

Traceback (Sphinx-specific frames cut at the top):

File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/readers/__init__.py", line 69, in read
self.parse()
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/readers/__init__.py", line 75, in parse
self.parser.parse(self.input, document)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/__init__.py", line 157, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 170, in run
input_source=document['source'])
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 233, in run
context, state, transitions)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 421, in check_line
return method(match, context, next_state)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 2678, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 323, in section
self.new_subsection(title, lineno, messages)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 391, in new_subsection
node=section_node, match_titles=1)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 278, in nested_parse
node=node, match_titles=match_titles)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 233, in run
context, state, transitions)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 421, in check_line
return method(match, context, next_state)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 1539, in line_block
self.nest_line_block_lines(block)
File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 1556, in nest_line_block_lines
if block[index].indent is None:
AttributeError: 'system_message' object has no attribute 'indent'

Discussion

  • Günter Milde
    Günter Milde
    2013-03-22

    • status: open --> closed-fixed
    • milestone: --> sandbox
     
  • Günter Milde
    Günter Milde
    2013-03-22

    Fixed. Thanks for the report.