Windows 10 - Toasts stopped working
ranelolesk opened this issue · 8 comments
Hello,
I have been using this library to display toasts on my Windows 10 machine for over a year now. However, all of a sudden the notifications have stopped working and all I see is a small tooltip on the taskbar with my icon.
I have been searching from the internet and this post below describes exactly the problem as well:
https://www.reddit.com/r/learnpython/comments/b1hx0h/win10toast_not_showing_notifications/
Additional information:
- No code changes have been made.
- Running on Windows 10 Enterprise 20H2.
- All other notifications are working correctly (other apps).
- Tried restarting.
- Tried looking for corrupt Windows packages.
- Have ensured that apps can run in background, notifications are enabled etc. and that there are no special rules for Python.
- Another notification library works just fine but I would like to keep using this one.
Kind of running out of ideas over here. Anybody had this issue?
Best regards,
Ranel
I had noticed annoying changes as well. for starters, the "python" title looks ugly.
before it would look like this
the only thing I can think of is the major win10 change to 20H2 that occurred about 1~2 weeks ago.
edit: probably related to #74
something I experienced too about win10toast:
whenever I want to show the system to someone, typically through a video call on MS Teams, then MS Teams would silently disable all notifications (and I didn't know) => accidentally leading me to believe win10toast was somehow broken. that one took me a while to figure out
Did anyone find a way to edit the Notification Title being "Python" or the executable name ?
I have exactly the same problem. The program works just fine in my personal computer. However no notifications are displayed on my work computer. In this last one, the only thing that appears is the small tooltip on the taskbar.
Has anyone found the issue?
I am using this. It works perfectly but I can't seem to figure out how to clear out the notifications or make python listen for click event
refer https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-ux-guidance
from winrt.windows.ui.notifications import ToastNotificationManager, ToastNotification
import winrt.windows.data.xml.dom as dom
notifier = ToastNotificationManager.create_toast_notifier(r'C:\Users\HP\AppData\Local\Programs\Python\Python38\python.exe')
tString = """<toast duration='short'><audio src = 'ms-winsoundevent:Notification.Reminder' loop = 'false' silent = 'false'/><visual><binding template='ToastText02'><text id="1">""" + title + """</text><text id="2">""" + desp + """</text></binding></visual></toast>"""
xDoc = dom.XmlDocument()
xDoc.load_xml(tString)
notifier.show(ToastNotification(xDoc))
Did anyone find a way to edit the Notification Title being "Python" or the executable name ?
when packed with pyinstaller, the title will change to your app name that you chose in pyinstaller
or if you just need some lightweight alternative to win10toast then try toastify
(I am the author of toastify
. It is a python wrapper around DesktopToast
library. It is very lightweight with wheel size of just 18kb. I had to make it because Win10Toast was not displaying image in toast.)
Same problem here since at least a couple of weeks ago. I came from using ntfy.exe, which I assume is based on the same principles and also doesn't work.
Any working alternative?
Start using https://pypi.org/project/winotify/, so far the best lib
Not a user of this library but I used the code as a starting point to build a notification library in go.
For me the settings in this library also did not work.
I changed the nif flags from NIF_ICON | NIF_MESSAGE | NIF_TIP
to NIF_INFO
. With this I can create notifications.
Maybe this is a starting point for someone who wants to fix this lib :)
Im still figuring things out in my lib so i don't know if NIF_INFO | NIF_ICON
would also work.