jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
971 stars 168 forks source link

Tkinter crash after use Toast #85

Closed rahmatagungj closed 3 years ago

rahmatagungj commented 3 years ago

Hello, thank you in advance for launching this library. I have trouble using Toast on windows 10, after the toast runs and is successfully issued through the bar in Windows the Tkinter program which I aim to retrieve the file crashes.

Code :

from win10toast import ToastNotifier
toaster = ToastNotifier()
toaster.show_toast(
        "Two Original Key Encryption",
         "Please wait, the application is being prepared to run.",
         icon_path="icon.ico",
         duration=20,
 )

Error :

 s = w.tk.call(self.command, *w._options(self.options))
_tkinter.TclError: Catastrophic failure

However if I remove the Toast library and don't use Toast launcher in windows 10, the Tkinter application can run successfully without any problem, someone knows what causes it or how to solve it?

Tenchia commented 3 years ago

Add threaded=True to toaster.show_toast(), that might help

rahmatagungj commented 3 years ago

Thanks bro.