TclError: bad option "<whatever>": must be cget or configure 
Author Message
 TclError: bad option "<whatever>": must be cget or configure

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.

Thanks!

Kevin.



Wed, 27 Apr 2005 11:36:49 GMT  
 TclError: bad option "<whatever>": must be cget or configure
This sounds {*filter*}.

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


Quote:

>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.



Sun, 01 May 2005 03:44:16 GMT  
 TclError: bad option "<whatever>": must be cget or configure
Thanks Russell... I'll definately try the dictionary method you mention, I
didn't know that would work (I've always used configure as per "the
manual"...).

If that fails, I'll see if I can put some tracing into Tkinter or something
to see just exactly what it's TRYING to call.  As much as I'm convinced it's
a Tkinter bug (or possibly a Tcl bug), I'm always happy to be wrong if it
solves my problem!  q:]

Much appreciated, I'll keep you posted

Kevin.



Quote:
> This sounds {*filter*}.

> 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



> >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.



Mon, 02 May 2005 08:18:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. bad option "delete": must configure

2. bad option "identify"

3. bad option "_scrollWidget" when Freewrapped

4. Problem "bad option delta" with Scrollbar

5. bad selection option "from"

6. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

7. Tile widgets: using "cget"

8. Strange return for canvas "cget -height"

9. handling "<>"

10. $key(<"file name">);

11. TASM "THIS <type>"

 

 
Powered by phpBB® Forum Software