tkinter errors out without clear message

Kai Song ksong at lbl.gov
Wed May 21 12:11:02 EDT 2014


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 at 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.
>>> import _tkinter
>>> import Tkinter
>>> Tkinter._test()
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
<ksong at lbl.gov> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140521/c6901f1c/attachment.html>


More information about the Python-list mailing list