tkinter errors out without clear message

K

Kai Song

Dear Python community,

I have been trying to make Tkinter work on my Scientific Linux 6 (SL6)
system. The python version is the SL6 default Python/2.6.6, and the tkinter
is also from SL6 repository, "tkinter-2.6.6-51.el6.x86_64".

I was able to import _tkinter and Tkinter, and the _test() will bring up an
empty window, but it will then fail without any actual error message. I
think it's when it tries to create buttons. I tried to use python gdb to
debug through the code, but It's hard to pin point the problem.

Here is the output:
[kai@localhost ~ ]$ python
Python 2.6.6 (r266:84292, Nov 21 2013, 12:39:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 3757, in _test
label = Label(root, text=text)
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 2466, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 1932, in __init__
(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError
I also tried to build python/2.7.5 from scratch, and this problem still
there. So, I suspect it could be due to system configuration, but without
actual error message, I don't know how to fix this. Did any of you come
across similar issues for Tkinter? Any advice would be greatly appreciated!

Thanks in advance!

Kai

--
Kai Song
<[email protected]> 1.510.495.2180
1 Cyclotron Rd. Berkeley, CA94720, MS-50B 3209
High Performance Computing Services (HPCS)
Lawrence Berkeley National Laboratory - http://scs.lbl.gov
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,863
Latest member
montyonthebonty

Latest Threads

Top