PYTHON- tkinter ERROR Cant evoke event command -
i making simple program incorporates use of tkinter. inclusion have copy , paste clipboard , check contents of keyboard. however, without change me, console spits out error :
can't invoke "event" command: application has been destroyed while executing "event generate $w <<themechanged>>" (procedure "ttk::themechanged" line 6) invoke within "ttk::themechanged"`
my questions:
- i not understand error means;
- i not understand how fix it.
from understanding, these error pop use of matplotlib, not using. python console still can function after message annoying , distracting.
here code think 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 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()
see 1 of comments this question
if use in console script might lead error, .destroy() function not work ("can't invoke "event" command: application has been destroyed while executing [...]"). prevent this, call r.update() before r.destroy.
Comments
Post a Comment