#20 Exception while building file

closed-works-for-me
David Goodger
None
5
2004-04-23
2004-04-02
Ian Bicking
No

This is from a CVS checkout, 1Apr2004

When processing the attached file, I get this traceback
(with buildhtml.py --traceback):

(in the file, line 67 is in a table -- I have rendered
this exact file to HTML with docutils in the past)

AttributeError: 'list' object has no attribute 'parent'
input line 67
module
/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py,
line 278, function nested_parse
AttributeError: 'list' object has no attribute 'parent'
input line 2
module
/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py,
line 278, function nested_parse
Traceback (most recent call last):
File "/home/ianb/bin/buildhtml.py", line 245, in ?
Builder().run()
File "/home/ianb/bin/buildhtml.py", line 173, in run
os.path.walk(directory, self.visit, recurse)
File "/usr/lib/python2.3/posixpath.py", line 282, in walk
func(arg, top, names)
File "/home/ianb/bin/buildhtml.py", line 192, in visit
prune = self.process_txt(directory, name)
File "/home/ianb/bin/buildhtml.py", line 215, in
process_txt
settings=settings)
File
"/usr/lib/python2.3/site-packages/docutils/core.py",
line 317, in publish_file
pub.publish(enable_exit=enable_exit)
File
"/usr/lib/python2.3/site-packages/docutils/core.py",
line 180, in publish
self.settings)
File
"/usr/lib/python2.3/site-packages/docutils/readers/__init__.py",
line 66, in read
self.parse()
File
"/usr/lib/python2.3/site-packages/docutils/readers/__init__.py",
line 72, in parse
self.parser.parse(self.input, document)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/__init__.py",
line 126, in parse
self.statemachine.run(inputlines, document,
inliner=self.inliner)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 171, in run
input_source=document['source'])
File
"/usr/lib/python2.3/site-packages/docutils/statemachine.py",
line 232, in run
context, next_state, result = self.check_line(
File
"/usr/lib/python2.3/site-packages/docutils/statemachine.py",
line 416, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 2637, in underline
self.section(title, source, style, lineno - 1,
messages)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 316, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 384, in new_subsection
node=section_node, match_titles=1)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 274, in nested_parse
node=node, match_titles=match_titles)
node=node, match_titles=match_titles)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 203, in run
results = StateMachineWS.run(self, input_lines,
input_offset)
File
"/usr/lib/python2.3/site-packages/docutils/statemachine.py",
line 232, in run
context, next_state, result = self.check_line(
File
"/usr/lib/python2.3/site-packages/docutils/statemachine.py",
line 416, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 1613, in grid_table_top
tableparser.GridTableParser)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 1624, in table_top
nodelist, blank_finish =
self.table(isolate_function, parser_class)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 1642, in table
table = self.build_table(tabledata, tableline)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 1748, in build_table
thead += self.build_table_row(row, tableline)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 1770, in build_table_row
node=entry)
File
"/usr/lib/python2.3/site-packages/docutils/parsers/rst/states.py",
line 278, in nested_parse
if block.parent and (len(block) - block_length) != 0:
AttributeError: 'list' object has no attribute 'parent'

Discussion

  • Ian Bicking
    Ian Bicking
    2004-04-02

    reST source that shows the problem

     
    Attachments
  • David Goodger
    David Goodger
    2004-04-23

    • assigned_to: nobody --> goodger
    • status: open --> closed-works-for-me
     
  • David Goodger
    David Goodger
    2004-04-23

    Logged In: YES
    user_id=7733

    It worked for me. It worked with the current code as well
    as with an April 1 checkout (-D2004-04-01). Can you
    reproduce the problem with the latest checkout? What's your
    PATH & PYTHONPATH? Is Docutils installed with "python
    setup.py install"? Were there other files being processed
    in the same buildhtml.py run? Does the problem persist if
    you process just this file, using rst2html.py?

    This may help:
    <http://docutils.sf.net/spec/notes.html#setting-up-for-docutils-development>.

    If the problem is still there, please re-open this bug.

    (This wasn't an April Fool's joke, was it? ;-)