Pmw Error: "TclError: can't unset "unknown_pending(": no such variable"
Marc
mnations at airmail.net
Fri Feb 14 18:54:03 EST 2003
Greetings,
I'm getting an error that I can't find an explanation for. It's very
intermittent and works 99% of the time. Then that 1% comes along and
causes my app to crash. It causes a window's exception, and an error
log is generated. This is unusual because usually Python errors are
caught before it ever hits windows. Here's the error:
----------------------------------------------------------
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.pyc", line 408, in __bootstrap
File "threading.pyc", line 396, in run
File "<string>", line 514, in workerThread1
File "<string>", line 728, in provisionBits
File "<string>", line 524, in printBitLog
File "<string>", line 333, in PrintBitLog
File "Pmw.pyc", line 725, in configure
File "Tkinter.pyc", line 1093, in configure
TclError: can't unset "unknown_pending(": no such variable
----------------------------------------------------------
This is the code it hits directly before the error:
def PrintBitLog(self, msg, line):
self.bitsDisplay.configure(text_state=NORMAL)
self.bitsDisplay.insert(END,msg)
self.bitsDisplay.yview(line)
self.bitsDisplay.configure(text_state=DISABLED)
self.log = open("log.txt","a")
self.log.write(msg)
self.log.close()
-----------------------------------------------------------
I'm passing in a line of text and a line number of 99999 to keep the
vertical scroll bar always at the bottom. But it doesn't appear to be
a problem with the variables. It appears somehow to lose the handle on
the widget that I created. I created it with the following code:
self.bitsDisplay = Pmw.ScrolledText(bitsFrame,
borderframe=1,labelpos=N,
label_text='RESULTS DISPLAY
WINDOW',
label_fg = 'dark blue',
label_font=(('', '', ''),
'10'),
usehullsize=10,
hull_width=400, hull_height=250,
text_padx=10, text_pady=1,
text_wrap='none')
self.bitsDisplay.configure(text_state=DISABLED,
text_background="gray90")
self.bitsDisplay.pack(padx=20)
bitsFrame.pack(ipady=10)
-------------------------------------------------------------------
Fairly straight-forward. Since it works most of the time, I don't
think it's a problem with my setup. It could be a threading issue. I
just don't have any idea. Any help would be appreciated.
Thanks ahead of time,
Marc
More information about the Python-list
mailing list