Menu

#68 process_assignment parser bug

v3.0
closed-fixed
inspection (59)
5
2006-08-22
2006-03-16
No

When I run 3.0 alpha1 like so:

epydoc --html --parse-only -o doc_path

I get the following exception about 20% of the way
through the build.

Traceback (most recent call last):
File "pyauto.py", line 249, in
DocWriter().go()entation:
Adapters.ATSPI.TableAdapter (/home/parente...
File "pyauto.py", line 78, in go
self.write()
File "pyauto.py", line 57, in write
cli()
File
"/usr/lib/python2.4/site-packages/epydoc/cli.py", line
315, in cli
main(options, names)
File
"/usr/lib/python2.4/site-packages/epydoc/cli.py", line
271, in main
add_submodules=(options.action!='text'))
File
"/usr/lib/python2.4/site-packages/epydoc/docbuilder.py",
line 129, in build_doc_index
doc_pairs = _get_docs_from_items(items, introspect,
parse, add_submodules)
File
"/usr/lib/python2.4/site-packages/epydoc/docbuilder.py",
line 232, in _get_docs_from_items
doc_pairs += _get_docs_from_package_dir(
File
"/usr/lib/python2.4/site-packages/epydoc/docbuilder.py",
line 423, in _get_docs_from_package_dir
docs += _get_docs_from_package_dir(
File
"/usr/lib/python2.4/site-packages/epydoc/docbuilder.py",
line 419, in _get_docs_from_package_dir
d = _get_docs_from_module_file(
File
"/usr/lib/python2.4/site-packages/epydoc/docbuilder.py",
line 370, in _get_docs_from_module_file
parse_doc = parse_docs(
File
"/usr/lib/python2.4/site-packages/epydoc/docparser.py",
line 274, in parse_docs
process_file(module_doc)
File
"/usr/lib/python2.4/site-packages/epydoc/docparser.py",
line 602, in process_file
prev_line_doc, lineno, comments, decorators)
File
"/usr/lib/python2.4/site-packages/epydoc/docparser.py",
line 713, in process_line
return process_assignment(*args)
File
"/usr/lib/python2.4/site-packages/epydoc/docparser.py",
line 1025, in process_assignment
is_instvar = lhs_is_instvar(lhs_pieces, parent_docs)
File
"/usr/lib/python2.4/site-packages/epydoc/docparser.py",
line 1103, in lhs_is_instvar
print len(posargs)
AttributeError: _Sentinel instance has no attribute
'__len__'

Discussion

  • Edward Loper

    Edward Loper - 2006-03-16

    Logged In: YES
    user_id=195958

    Can you please attach a python source file that generates
    this bug when you run epydoc on it? (Use -vv when you run
    epydoc to see what file it was processing when it died.)

    From your traceback, it looks like the parser created a
    documentation object for a function, but did not extract
    its argument list for some reason.

     
  • Peter Parente

    Peter Parente - 2006-04-21

    Logged In: YES
    user_id=624776

    Might be resolved in alpha2. Can't tell because I'm getting
    a different exception now before this one occurs. Will
    provided information as it becomes available.

     
  • Edward Loper

    Edward Loper - 2006-08-22

    Logged In: YES
    user_id=195958

    Thanks for the bug report.

    This bug should be fixed in the current subversion
    revision.

     
  • Edward Loper

    Edward Loper - 2006-08-22
    • status: open --> closed-fixed
     

Log in to post a comment.