Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#253 TypeError: 'int' object is unsubscriptable

closed-fixed
nobody
5
2008-02-11
2008-02-11
Anonymous
No

Hi,

I got this error when trying to parse my project. Is this a known issue? I can try to pinpoint the cause.

Traceback (most recent call last): Progress: 00:14
File "/usr/bin/epydoc", line 13, in <module>-----------------------------------------------------------------------------------------------------------------------------------]
cli() Building documentation: encoder.backends.mencoder (/home/moo/workspace/mediaencoder/encoder/backends/mencoder.pyc)
File "/usr/lib/python2.5/site-packages/epydoc/cli.py", line 965, in cli
main(options, names)
File "/usr/lib/python2.5/site-packages/epydoc/cli.py", line 757, in main
exclude_parse=exclude_parse)
File "/usr/lib/python2.5/site-packages/epydoc/docbuilder.py", line 206, in build_doc_index
doc_pairs = _get_docs_from_items(items, options)
File "/usr/lib/python2.5/site-packages/epydoc/docbuilder.py", line 398, in _get_docs_from_items
item, doc_pairs[-1], options, progress_estimator)
File "/usr/lib/python2.5/site-packages/epydoc/docbuilder.py", line 602, in _get_docs_from_submodules
subpackage_dir, docs[-1], options, progress_estimator)
File "/usr/lib/python2.5/site-packages/epydoc/docbuilder.py", line 595, in _get_docs_from_submodules
module_filename, options, progress_estimator, pkg_docs)
File "/usr/lib/python2.5/site-packages/epydoc/docbuilder.py", line 549, in _get_docs_from_module_file
filename=filename, context=parent_docs[1])
File "/usr/lib/python2.5/site-packages/epydoc/docparser.py", line 289, in parse_docs
handle_special_module_vars(module_doc)
File "/usr/lib/python2.5/site-packages/epydoc/docparser.py", line 324, in handle_special_module_vars
public_names = set(parse_string_list(toktree))
File "/usr/lib/python2.5/site-packages/epydoc/docparser.py", line 1825, in parse_string_list
elt_list[0][0][1] in ('(', '[')):
TypeError: 'int' object is unsubscriptable

Discussion

  • Logged In: NO

    Looks like commenting out this line works around the bug:

    __all__ = ("VideoReencodeSpecification")

     
  • Edward Loper
    Edward Loper
    2008-02-11

    Logged In: YES
    user_id=195958
    Originator: NO

    Hm, ok, I'll get that fixed -- at the very least it should just complain but not die.

    But that line you commented out in your code was probably meant to set __all__ to be a list, not a string, right? (Remember that parens don't make a tuple, a comma does). So I'm guessing you wanted:

    __all__ = ("VideoReencodeSpecification",)

    If you make that change, does epydoc work as intended?

     
  • Edward Loper
    Edward Loper
    2008-02-11

    • status: open --> closed-fixed
     
  • Edward Loper
    Edward Loper
    2008-02-11

    Logged In: YES
    user_id=195958
    Originator: NO

    This bug has been fixed in svn (as of revision 1700).