Message27659
On some objects I have, calling 'help(obj)' raises an
exception. Python 2.4.2, Windows XP.
This is the traceback, together with some info from
pdb.pm():
>>> help(r)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python24\lib\site.py", line 328, in __call__
return pydoc.help(*args, **kwds)
File "c:\python24\lib\pydoc.py", line 1647, in __call__
self.help(request)
File "c:\python24\lib\pydoc.py", line 1691, in help
else: doc(request, 'Help on %s:')
File "c:\python24\lib\pydoc.py", line 1475, in doc
pager(title % desc + '\n\n' + text.document(object,
name))
File "c:\python24\lib\pydoc.py", line 296, in document
if inspect.isclass(object): return self.docclass(*args)
File "c:\python24\lib\pydoc.py", line 1193, in docclass
lambda t: t[1] == 'method')
File "c:\python24\lib\pydoc.py", line 1143, in spill
name, mod, object))
File "c:\python24\lib\pydoc.py", line 301, in document
return self.docother(*args)
File "c:\python24\lib\pydoc.py", line 1290, in docother
chop = maxlen - len(line)
TypeError: unsupported operand type(s) for -:
'_compointer_meta' and 'int'
>>> import pdb
>>> pdb.pm()
> c:\python24\lib\pydoc.py(1290)docother()
-> chop = maxlen - len(line)
(Pdb) args
self = <pydoc.TextDoc instance at 0x00CC0DA0>
object = <comtypes.named_property object at 0x00CA9390>
name = Item
mod = None
maxlen = <class 'comtypes.POINTER(IROIList)'>
doc = None
(Pdb) where
<stdin>(1)?()
c:\python24\lib\site.py(328)__call__()
-> return pydoc.help(*args, **kwds)
c:\python24\lib\pydoc.py(1647)__call__()
-> self.help(request)
c:\python24\lib\pydoc.py(1691)help()
-> else: doc(request, 'Help on %s:')
c:\python24\lib\pydoc.py(1477)doc()
-> print value
c:\python24\lib\pydoc.py(299)document()
-> pass
c:\python24\lib\pydoc.py(1193)docclass()
-> lambda t: t[1] == 'method')
c:\python24\lib\pydoc.py(1143)spill()
-> name, mod, object))
c:\python24\lib\pydoc.py(301)document()
-> return self.docother(*args)
> c:\python24\lib\pydoc.py(1290)docother()
-> chop = maxlen - len(line)
(Pdb)
The problem seems to be that the TextDoc.docother
method is called with unexpected arguments.
The signature is
docother(object, name, mod, maxlen, doc)
but it is called with the object to document as the
'maxlen' parameter. |
|
Date |
User |
Action |
Args |
2007-08-23 14:38:11 | admin | link | issue1442012 messages |
2007-08-23 14:38:11 | admin | create | |
|