Hello,

I'm using rst2html to build my web site. I'm trying to put some lists in a sidebar but I get the following error:

$ rst2html --section-numbering --cloak-email-addresses --record-dependencies=.deps.1 index.rst index.html
AttributeError: 'system_message' object has no attribute 'indent'
Exiting due to error.  Use "--traceback" to diagnose.
Please report errors to <docutils-users@lists.sf.net>.
Include "--traceback" output, Docutils version (0.6 [release]),
Python version (2.6.6), your OS type & version, and the
command line used.


A list with one item works but not with two or more...

eg: this doesn't work

.. sidebar:: |url|

    About me:
        * `English resume <cv/cv.en.html>`_ `(PDF) <cv/cv.en.pdf>`__
        * `CV français <cv/cv.fr.html>`_ `(PDF) <cv/cv.fr.pdf>`__

The sidebar is in a file that is included in the main document.


Here is the traceback:

Traceback (most recent call last):
  File "/usr/bin/rst2html", line 23, in <module>
    publish_cmdline(writer_name='html', description=description)
  File "/usr/lib/pymodules/python2.6/docutils/core.py", line 336, in publish_cmdline
    config_section=config_section, 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 421, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 2903, in text
    self.section(title.lstrip(), source, style, lineno + 1, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 323, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 391, in new_subsection
    node=section_node, match_titles=1)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 278, 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 421, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 2903, in text
    self.section(title.lstrip(), source, style, lineno + 1, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 323, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 391, in new_subsection
    node=section_node, match_titles=1)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 278, in nested_parse
1532         if not blank_finish:
    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 421, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 2678, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 323, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 391, in new_subsection
    node=section_node, match_titles=1)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 278, 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 421, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1583, in grid_table_top
    tableparser.GridTableParser)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1594, in table_top
    nodelist, blank_finish = self.table(isolate_function, parser_class)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1612, in table
    table = self.build_table(tabledata, tableline)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1732, in build_table
    tbody += self.build_table_row(row, tableline)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1750, in build_table_row
    node=entry)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 278, 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 421, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.6/docutils/parsers/rst/states.py", line 1539, in line_block
    self.nest_line_block_lines(block)
  File "/usr/lib/pymodules/python2.6/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'


I can quickly fixed it by changing the line 1556 of state.py (in nest_line_block_lines):

             if not hasattr(block[index], 'indent') or block[index].indent is None:

But I'm not sure this doesn't break something else.

Best regards,
Christophe Delord.