This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Traceback in pydoc
Type: Stage:
Components: None Versions:
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, theller
Priority: normal Keywords:

Created on 2006-03-02 20:04 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27659 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-03-02 20:04
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

>>> help(r)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python24\lib\", line 328, in __call__
    return*args, **kwds)
  File "c:\python24\lib\", line 1647, in __call__
  File "c:\python24\lib\", line 1691, in help
    else: doc(request, 'Help on %s:')
  File "c:\python24\lib\", line 1475, in doc
    pager(title % desc + '\n\n' + text.document(object,
  File "c:\python24\lib\", line 296, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "c:\python24\lib\", line 1193, in docclass
    lambda t: t[1] == 'method')
  File "c:\python24\lib\", line 1143, in spill
    name, mod, object))
  File "c:\python24\lib\", line 301, in document
    return self.docother(*args)
  File "c:\python24\lib\", line 1290, in docother
    chop = maxlen - len(line)
TypeError: unsupported operand type(s) for -:
'_compointer_meta' and 'int'
>>> import pdb
> c:\python24\lib\
-> 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
-> return*args, **kwds)
-> else: doc(request, 'Help on %s:')
-> print value
-> pass
-> lambda t: t[1] == 'method')
-> name, mod, object))
-> return self.docother(*args)
> c:\python24\lib\
-> chop = maxlen - len(line)

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.
msg27660 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-03-07 13:42
Logged In: YES 

This was already fixed in rev. 39636/7 and will be in 2.4.3.
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42971
2006-03-02 20:04:35thellercreate