WindowsToaster.clear_toasts() doesn't work
Closed this issue · 1 comments
dariopnc commented
Hello, I'm creating a few toasts with my code and I want to clear them all when the process ends, but I wasn't able to use the method WindowsToaster.clear_toasts()
without getting this error:
AttributeError: 'WindowsToaster' object has no attribute 'notifierAUMID'
I made an example code that shows the issue.
The expected behavior would be that all toasts created with that toaster are gone and no exceptionis raised.
from windows_toasts import Toast, ToastDisplayImage, WindowsToaster
toaster = WindowsToaster('Windows-Toasts')
newToast = Toast()
newToast.text_fields = ['Wow','two lines','lorem ipsum dolor sit amet']
# str or PathLike
newToast.AddImage(ToastDisplayImage.fromPath('C:\\Windows\\System32\\@WLOGO_48x48.png'))
toaster.show_toast(newToast)
manual_go=input("Press enter to clear the toast")
toaster.clear_toasts()