Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71865

tkinter errors out without clear message

Date 2014-05-21 11:11 -0500
Subject tkinter errors out without clear message
From Kai Song <ksong@lbl.gov>
Newsgroups comp.lang.python
Message-ID <mailman.10200.1400689213.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

tkinter errors out without clear message Kai Song <ksong@lbl.gov> - 2014-05-21 11:11 -0500

csiph-web