#57 Exception in browsing libraries (Tools->Browse PythonPath

closed-fixed
Mark Hammond
pythonwin (176)
5
2004-07-13
2003-10-03
No

Using the 2.3 distribution and the latest 159 release
of pythonwin.
I get the following traceback when I click on the + in
the library browser for xml.dom.minidom.

The problem also appears for other libraries displayed
in the tree view, but not for all...

PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200
32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond
(mhammond@skippinet.com.au) - see 'Help/About
PythonWin' for further copyright information.
>>> Traceback (most recent call last):
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\hierlist.py",
line 123, in OnTreeItemExpanding
self.AddSubList(itemHandle, self.GetSubList(item))
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\hierlist.py",
line 137, in AddSubList
self.AddItem(parentHandle, item)
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\hierlist.py",
line 140, in AddItem
text = self.GetText(item)
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\hierlist.py",
line 266, in GetText
return self.DelegateCall( item.GetText )
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\hierlist.py",
line 255, in DelegateCall
return fn()
File
"C:\softs\python\lib\site-packages\Pythonwin\pywin\tools\browseProjects.py",
line 26, in GetText
return self.name + self.suffix
TypeError: unsupported operand type(s) for +:
'instance' and 'str'
win32ui: Exception in OnNotify() handler

Discussion

  • Maxim Sokolov
    Maxim Sokolov
    2004-01-28

    Logged In: YES
    user_id=264383

    The problem is that self.name for module level functions
    containes Function object and not string object.
    I have pached it with:
    lib\site-packages\Pythonwin\pywin\tools\browseProjects.py
    line 26:
    return self.name + self.suffix
    changed to:
    name = self.name
    if not isinstance(self.name, type("")):
    name = self.name.name
    return name + self.suffix

     
  • Logged In: YES
    user_id=214484

    The fix proposed by dsuki works. I had thought it'd be
    included but its not yet in V201.
    It can probably be made into a single line change.

     
  • diff for patching

     
    Attachments
    • assigned_to: nobody --> mhammond
    • summary: Exception in browsing libraries (Tools->Browse PythonPath) --> Exception in browsing libraries (Tools->Browse PythonPath
     
  • Mark Hammond
    Mark Hammond
    2004-07-13

    • status: open --> closed
     
  • Mark Hammond
    Mark Hammond
    2004-07-13

    Logged In: YES
    user_id=14198

    Checking in browseProjects.py;
    new revision: 1.2; previous revision: 1.1

     
  • Mark Hammond
    Mark Hammond
    2004-07-13

    • status: closed --> closed-fixed