TclError: bad option "<whatever>": must be cget or configure
Russell E. Owen
owen at nospam.invalid
Tue Nov 12 14:44:16 EST 2002
This sounds nasty.
I ran Wish to see if I could figure out what makes your error, and it's
acting as if both "config" and the name of the option to be configured
are missing:
frame .g
.g config -bg "red"; # correct
.g config "red"; # wrong
unkonwn option "red"
.g "red"; # wrong
bad option "red": must be cget or configure
I was not able to find an equivalent Tkinter command to produce this
error message, but I don't claim to have tried everything. For instance:
f = Frame()
f.yellow()
AttributeError: Frame instance has no attribute 'yellow'
f["yellow"]
TclError: unknown option "-yellow"
Can you test the hypothesis that it's thread-related? Can you produce a
short program that exhibits the problem that others can try?
Also, as sort of voodoo, you might try replacing your use of configure
with the dictionary approach, e.g. frame["bg"] = "yellow", to see if
this helps or changes the error message to something more useful.
-- Russell
In article <lp%y9.15549$O71.6983 at rwcrnsc53>,
"Kevin at Cazabon.com" <kevin at cazabon.com> wrote:
>I'm having some weird Tcl errors, and can't seem to track them down, any
>help?
>
>1) these are happening in multiple locations, when I use the "configure"
>method for widgets
>
>2) the calls work 99.9% of the time, but when the system is under heavy
>load they fail with "TclError: bad option "yellow": must be cget or
>configure" errors
>
>3) I'm using a valid "configure" command (such as
>self.label.configure(text="yellow")), and it seems to think I called
>"self.frame.yellow()" or self.frame.configure(yellow = xxx).
>
>
>My application is multi-threaded (3 threads total, all using locks/mutexes
>on shared objects, only one thread is doing Tcl stuff), and I'm using
>ActivePython 2.2.1 build 222.
More information about the Python-list
mailing list