I am making a simple program that also incorporates the use of TKinter. The inclusion is to have it copy and paste to my clipboard and also to check the contents of my keyboard. However, without much change from me, the console spits out an error :
can't invoke "event" command: application has been destroyed while executing
"event generate $w <<ThemeChanged>>" (procedure "ttk::ThemeChanged" line 6)
invoke from within "ttk::ThemeChanged"`
My questions:
- I do not understand what the error means;
- I do not understand how to fix it.
From my understanding, these error usually pop up from the use of matplotlib, which I am not using. The python console still can function after this message but it is annoying and distracting.
here is the code that i think is affecting it.
from Tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append(finalbib)
r.destroy()
#os.startfile("TEMPPY.py")
clipbardtest=True
while clipbardtest:
r=Tk()
clippytest = r.clipboard_get()
r.destroy()
if clippytest==finalbib:
os.system('cls')
print "Successfully copied to clipboard"
#os.remove("TEMPPY.py")
clipbardtest=False
morebibdef()
else:
time.sleep(1.2)
#os.startfile("TEMPPY.py")
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append(finalbib)
r.destroy()