473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Tkinter "Expected boolean value"


Good morning.

I've got a Tkinter problem:

File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""

Now a few weeks ago there was a similar problem with the boolean value.
That's when the tcl started returning "???" for unknown fields in a
callback. This looks to be related. I am running the newest cygwin version
of python (Python 2.3 (#1, Aug 5 2003, 09:49:11)) with libtk and libtcl
8.4.

Is it possible to fix this without re-compiling? I've got a lot of
c-modules/wrappers etc. I'll have to do an installation of my program soon
and so far I've been able to use only the stock versions of cygwin.

Greg

"Many a man may look respectable, and yet be able to hide at will behind a
spiral staircase."
- Pelham (Plum) Grenville Wodehouse
Jul 18 '05 #1
4 5195

I am sorry to be reposting this after only 20 hours, but this newsgroup is
very busy and I am quite desperate for an answer.

Please, if you know anything about this problem - let me know.
I am running the newest version of both python and tcl/tk available for
cygwin.

Grzegorz Dostatni

On Thu, 27 Nov 2003, Grzegorz Dostatni wrote:

Good morning.

I've got a Tkinter problem:

File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""

Now a few weeks ago there was a similar problem with the boolean value.
That's when the tcl started returning "???" for unknown fields in a
callback. This looks to be related. I am running the newest cygwin version
of python (Python 2.3 (#1, Aug 5 2003, 09:49:11)) with libtk and libtcl
8.4.

Is it possible to fix this without re-compiling? I've got a lot of
c-modules/wrappers etc. I'll have to do an installation of my program soon
and so far I've been able to use only the stock versions of cygwin.

Greg

"Many a man may look respectable, and yet be able to hide at will behind a
spiral staircase."
- Pelham (Plum) Grenville Wodehouse


Jul 18 '05 #2
You'd do better with tk8.3 than 8.4. There were some incompatible
changes in Tk 8.4's "bind" command that cause Python problems. I'm not
sure in what version of Python this problem is fixed.

As for your 'expected boolean value' problem, there's not enough
information for me to guess the cause. It's not something I've heard of
before. If you want help, your best bet would be to post a small
program that is runnable and demonstrates the problem.

Jeff

Jul 18 '05 #3
Grzegorz Dostatni <gr******@ee.ualberta.ca> wrote:
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""


I guess: Tcl needs a boolean value and gets an empty string?

Try to look in this direction.

Mike
Jul 18 '05 #4
Grzegorz Dostatni <gr******@ee.ualberta.ca> wrote:
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""


After looking in the man-page of Tcl_GetBoolean here is a more precise
answer.

"Tcl_GetBoolean expects string to specify a boolean value. If string is
any of 0, false, no, or off, then Tcl_GetBoolean stores a zero value at
*boolPtr. If string is any of 1, true, yes, or on, then 1 is stored at
*boolPtr. Any of these values may be abbreviated, and upper-case
spellings are also acceptable."

Hope that helps.

Mike

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Danny | last post by:
Hi I don't understand why I keep getting "Error: Object expected" I tried different things and haven't been able to solve it. I'm a newbie so I'm not sure what I'm doing wrong. The debugger breaks...
5
by: Rick | last post by:
I wrote the following code as part of a page where users can reorder a list of items by highlighting an item in a list box and clicking an "up" or "down" button to move the items around. The code...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
6
by: Alan Silver | last post by:
Hello, I am data binding a repeater that has a checkbox in the ItemTemplate. The data value coming out of the database is a char(1) field containing either "y" or "n". I want to use this value...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
16
by: Steve Chapel | last post by:
When I load the page <https://bugzilla.mozilla.org/attachment.cgi?id=237739with Internet Explorer 7 RC 1, I get the error "Object Expected" at line 174. When I click on the button, I also get the...
2
by: thj | last post by:
Hi. I've got this form that I'm trying to validate: <form id="periodForm" action="" method="post"> <p> Periode: <input id="startDate" name="startDate" type="text" size="7" value="<%=...
9
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list...
9
by: erictheone | last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.