Traceback (most recent call last): Progress: 00:12
File "/usr/bin/epydoc", line 13, in ?-------------------------------------]
cli() Parsing docstrings: weakref.WeakValueDictionary
File "/usr/lib/python2.4/site-packages/epydoc/cli.py", line 949, in cli
main(options, names)
File "/usr/lib/python2.4/site-packages/epydoc/cli.py", line 741, in main
exclude_parse=exclude_parse)
File "/usr/lib/python2.4/site-packages/epydoc/docbuilder.py", line 261, in build_doc_index
parse_docstring(val_doc, docindex)
File "/usr/lib/python2.4/site-packages/epydoc/docstringparser.py", line 239, in parse_docstring
field.arg(), field.body())
File "/usr/lib/python2.4/site-packages/epydoc/docstringparser.py", line 555, in process_field
handler(api_doc, docindex, tag, arg, descr)
File "/usr/lib/python2.4/site-packages/epydoc/docstringparser.py", line 756, in process_ivar_field
set_var_descr(api_doc, ident, descr)
File "/usr/lib/python2.4/site-packages/epydoc/docstringparser.py", line 840, in set_var_descr
canonical_name=api_doc.canonical_name+ident)
TypeError: unsupported operand type(s) for +: 'instance' and 'unicode
You can get the code I was trying to document by:
svn co http://svn.gnome.org/svn/lsr/trunk lsr
Command I used was the following:
epydoc -o api -v --debug src/*.py \ $(find src/ -name __init__.py | cut -d / -f -2 | sort | uniq)
Logged In: YES
user_id=195958
Originator: NO
I suspect that this bug has the same underlying cause as bug 1682525
http://sourceforge.net/tracker/index.php?func=detail&aid=1682525&group_id=32455&atid=405618
Namely, some object is not getting assigned a canonical name. The code in epydoc.docbuilder.assign_canonical_names is *supposed* to ensure that every reachable apidoc object has a canonical name, but something must be slipping through the cracks somewhere. Try wrapping the failing statement in a try/except block, and then printing the value of "api_doc", and or "api_doc.pyval". You can do this most easily using log.error():
try:
canonical_name = ...
except:
log.error(api_doc)
log.error(api_doc.pyval)
If you let us know what the value is, and what you would expect the "canonical name" for that object to be (namely, the path by which it can be reached from the root), it would help us figure out what the problem is.
Logged In: YES
user_id=195958
Originator: NO
Ok, I've tracked down the cause of this bug. It happens when:
a) a package's submodule becomes shadowed by a variable.
b) the submodule is introspected & put into the cache of introspected values as part of introspecting some other value, before epydoc tries to introspect the module directly.
I'll start trying to figure out a good way to fix this.
Logged In: YES
user_id=195958
Originator: NO
This bug should be fixed now, in svn revision 1648.
If you get a chance, please test it to make sure.
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).