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

Not working on Windows 10 Enterprise x64 version 17763.316 #25

Open
mocobk opened this issue Nov 30, 2020 · 4 comments
Open

Not working on Windows 10 Enterprise x64 version 17763.316 #25

mocobk opened this issue Nov 30, 2020 · 4 comments
Labels
bug Something isn't working Windows

Comments

@mocobk
Copy link

mocobk commented Nov 30, 2020

notification.send() returned True, but show nothing

Windows 10 Enterprise x64 version 17763.316

@ms7m ms7m added bug Something isn't working Windows labels Nov 30, 2020
@ms7m ms7m changed the title it's not work for me on windows10 Not working on Windows 10 Enterprise x64 version 17763.316 Nov 30, 2020
@ms7m
Copy link
Owner

ms7m commented Nov 30, 2020

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

@mocobk
Copy link
Author

mocobk commented Dec 1, 2020

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

@ms7m
Copy link
Owner

ms7m commented Dec 1, 2020

Interesting!

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

@mocobk
Copy link
Author

mocobk commented Dec 1, 2020

Interesting!

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

works too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows
Projects
None yet
Development

No branches or pull requests

2 participants