notify-py icon indicating copy to clipboard operation
notify-py copied to clipboard

Not working on Windows 10 Enterprise x64 version 17763.316

Open mocobk opened this issue 4 years ago • 4 comments

notification.send() returned True, but show nothing

Windows 10 Enterprise x64 version 17763.316

mocobk avatar Nov 30 '20 11:11 mocobk

Thank you for the bug report. Can you run the notification with logging enabled and see what messages appear

from notifypy import Notify

n = Notify(enable_logging=True)

n.send()

ms7m avatar Nov 30 '20 13:11 ms7m

Thank you for the bug report. Can you run the notification with logging enabled and see what messages appear

from notifypy import Notify

n = Notify(enable_logging=True)

n.send()

2020-12-01 10:26:48.989 | INFO | notifypy.notify:init:51 - Logging is enabled. 2020-12-01 10:26:49.589 | INFO | notifypy.notify:send_notification:314 - Sent notification.

when I replaced the $APP_ID with {1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe in powershell script, it's work!

[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null

# $APP_ID = "Python Application (notify.py)"
$APP_ID = "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe"

$template = @"
<toast duration="short"><visual><binding template="ToastImageAndText02"><image id="1" src="C:\Users\Admin\.virtualenvs\upimg-IGyqvpu_\lib\site-packages\notifypy\py-logo.png" /><text id="1">Default Title</text><text id="2">Default Message</text></binding></visual></toast>
"@

$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$toast = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($toast)

image

mocobk avatar Dec 01 '20 02:12 mocobk

Interesting!

If changing the APP ID works, go ahead and try to set the .application_name attribute to the same ID?

ms7m avatar Dec 01 '20 02:12 ms7m

Interesting!

If changing the APP ID works, go ahead and try to set the .application_name attribute to the same ID?

works too

mocobk avatar Dec 01 '20 04:12 mocobk