> can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"

Has anyone ever seen this error before? It keeps appearing when I load a toolkit I need for my project. I've been working to find out where its coming from and here's what I've found. I'm using Python 2.5.

>>> import OpenGL
>>> from OpenGL.Tk import *
>>> can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"

I have the PyOpenGL package loaded, but I feel like I'm missing something that causes this to happen. Any help would be greatly appreciated. Thanks.

Recommended Answers

All 5 Replies

What Platform are you on? If this is linux you'll likely need to install tcl/tk to enable the Tk support portion of OpenGL

Yes, this is Ubuntu I'm working with. I have the tcl and tk packages installed as well as the tcl8.5 and tk8.5 packages installed. I then reinstalled OpenGL as well as reinstalled Python, but I keep getting the same message for the "from OpenGL.Tk import *" line.

Wow, so this page lists a whole butt-load of dependencies that OpenGL has. Did you get any complaints when you compiled it for your system?

After skimming those dependencies it looks like you'll need Togl:

# Togl v1.5+

* You will need the Tcl/Tk version for your Python installation (often not installed)
* Only required if you want to use PyOpenGL with Tk-based GUI programs

Did you already stumble upon this page and install all those things? IF so then I guess I'm out of ideas :(

Yes, I have stumbled onto this page; however, looking over Togl again, I think I don't have it properly set up.

Togl is a libary and I need to input it into my tcl8.5 and tk8.5 folder; however, I'm not entirely sure how to do this (I'm very new to Linux). When I try to move the library over, it says Permission Denied. Also, I don't fully understand the instructions of the ./configure that can supposedly solve the problem. The instructions I have been given are the following:

(1) To intstall Togl, download it from this site on SourceForge. As of July 2007, Version 1.7 is fine.

After unpacking the tarball, installing it on my Linux box was as simple as:

./configure; make; sudo make install

(2) To build Tck/Tk libraries with Togl support, go to this site on SourceForce to download the latest versions of Tcl and Tk.

As of July 2007, I was unable to build version 8.4.15 on my Redhat Linux box due to an odd error, but 8.4.7 built fine. After unpacking the two tarballs I did the following:

cd tcl8.4.7/unix
./configure; make; sudo make install
cd tk8.4.7/unix
./configure; make; sudo make install

This build should find the Togl library previously installed under /usr/local.

(3) Now you can re-build Python and it should find the correct Tcl/Tk libraries under /usr/local. Note that when you run ./configure as the first step in building Python, it will tell you what it found for Tcl/Tk.

-------------------------------

So, I have the tarball unpacked, but I don't know how to configure and install it in the proper directories (which I know where the directories are, but putting anything in them leads to a Permission Denied error).

I really appreciate your help with this. Thanks.

from OpenGL.Tk import *

I'm getting the error:

No handlers could be found for logger "OpenGL.Tk"

Traceback (most recent call last):
File "C:\Users\Me\Desktop\Pyhton openGL\Super 3.py", line 4, in <module>
from OpenGL.Tk import *
File "C:\Python25\Lib\site-packages\OpenGL\Tk\__init__.py", line 114, in <module>
_default_root.tk.call('package', 'require', 'Togl')
TclError: can't find package Togl

I'm using windows and I've searched for a simple explanation but could not find one. Can you please assist.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.