Pmw exceptions

David Allen s2mdalle at titan.vcu.edu
Thu Jan 4 23:51:45 EST 2001


I'm close to my wit's end with regard to these problems
I've been having with Pmw of late...here's the exception
that keeps happening in a completely unreproduceable
way, at random times:

Traceback (innermost last):
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 764, in __call__
    return apply(self.func, args)
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 227, in callit
    apply(func, args)
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledFrame.py", line 335, in _scrollBothNow
    xview = self._getxview()
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledFrame.py", line 251, in _getxview
    clipperWidth = self._clipper.winfo_width()
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 442, in winfo_width
    return getint(
TclError: bad window path name ".135904648.136185616.136517944.136580888.136581216.136582336"

In this example, I'm using Pmw 0.8.4 and Python 1.5.2,
but I've also done the same thing many times with 
python 2.0, Tkinter-2.0-8.0, Pmw 0.8.4.

The thing is that none of my code is causing these
exceptions - it seems to be Pmw.  Also in some situations
with ScrolledFrame widgets, exceptions get thrown
related to the scrollbars:

Exception in Tkinter callback
Traceback (innermost last):
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 764, in __call__
    return apply(self.func, args)
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 227, in callit
    apply(func, args)                                             
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledFrame.py",
+line 337, in _scrollBothNow
    self._horizScrollbar.set(xview[0], xview[1])
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 1620, in set
    self.tk.call((self._w, 'set') + args)
TclError: invalid command name
+".135436696.136171776.136299000.136254976.136330840"

And then totally random ones that are related to
my code, but not in any way that I can see that
changing anything would help:

Unhandled exception in thread:
Traceback (innermost last):
  File "./TkGui.py", line 410, in download_function
    contentKey = self.createContentFrame(request)
  File "./TkGui.py", line 496, in createContentFrame
    wid  = self.responseToWidget(resp, resource)
  File "./TkGui.py", line 612, in responseToWidget
    resp, resource, filename)
  File "./GUIFile.py", line 46, in __init__
    vscrollmode='static')
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledText.py", line 92, in __init__
    self.initialiseoptions(ScrolledText)
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwBase.py", line 565, in initialiseoptions
    func()
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledText.py", line 176, in _vscrollMode
    self._configureScrollCommands()
  File "/usr/lib/python1.5/site-packages/Pmw/Pmw_0_8_4/lib/PmwScrolledText.py", line 190, in _configureScrollCommands
    self._textbox.deletecommand(tclCommandName)
  File "/usr/lib/python1.5/lib-tk/Tkinter.py", line 157, in deletecommand
    self.tk.deletecommand(name)
TclError: can't delete Tcl command

The source for the complete program I'm talking about
in all of this is at 
http://opop.nols.com/proggie/forg-0.03.1.tar.gz
It's a Gopher client using Tkinter/Pmw.

Does anybody have any idea why any of these are 
happening, or how I can fix them? I've mailed the
Pmw maintainer about the ones that seem to be
purely Pmw's fault, but I haven't gotten any response.

I've been on several IRC channels chatting about this,
and some people seem to think that these TclError's
just happen, and that there isn't much you can do
about them.  That can't *possibly* be right. Is it?

Any help would be greatly appreciated.
-- 
David Allen
http://opop.nols.com/



More information about the Python-list mailing list