The error: `Tcl_AsyncDelete: async handler deleted by the wrong thread` is raised on exit with the `--gui` option. This is probably caused by running the tkinter window in a background thread.
The error:
Tcl_AsyncDelete: async handler deleted by the wrong threadis raised on exit with the
--guioption. This is probably caused by running the tkinter window in a background thread.