Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 - Toasts stopped working #86

Open
ranelolesk opened this issue Mar 9, 2021 · 8 comments
Open

Windows 10 - Toasts stopped working #86

ranelolesk opened this issue Mar 9, 2021 · 8 comments

Comments

@ranelolesk
Copy link

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

@alexisdal
Copy link

alexisdal commented Mar 9, 2021

I had noticed annoying changes as well. for starters, the "python" title looks ugly.

before it would look like this
image

now it looks like that:
image

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

@hugogva
Copy link

hugogva commented Mar 11, 2021

Did anyone find a way to edit the Notification Title being "Python" or the executable name ?

@J-escandon
Copy link

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?

@maxwill-max
Copy link

maxwill-max commented Mar 24, 2021

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))

@frak0d
Copy link

frak0d commented Apr 10, 2021

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.)

@romanrdgz
Copy link

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?

@pranky89
Copy link

Start using https://pypi.org/project/winotify/, so far the best lib

@Simerax
Copy link

Simerax commented Dec 17, 2022

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.

17_12_2022_14_39_08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants