Is there any recommendation which tkinter calls have to be protected with an exception handling I occasionally receive traceback errors from my users on various calls like: grab_current, grab_release, focus_get most of the times I protect them with with a TclError handler catching exceptions like_tkinter.TclError: bad window path name
Also which type of exception has to be protected, this is the first time I've got a KeyError from a tkinter call, which normally should be innocent focus_get()" Traceback: Traceback (most recent call last): File "/usr/local/flair/tkFlair.py", line 1304, in __call__ return self.func(*args) File "/usr/local/flair/InputExtra.py", line 1026, in focusOut self._focus = self.focus_get() File "/usr/lib/python3.8/tkinter/__init__.py", line 748, in focus_get return self._nametowidget(name) File "/usr/lib/python3.8/tkinter/__init__.py", line 1498, in nametowidget w = w.children[n] KeyError: '__tk__messagebox'
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss