-
Notifications
You must be signed in to change notification settings - Fork 10
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
OSError on Windows #41
Comments
Thanks for the report. I no longer have access to a Windows VM, after switching to an Apple Silicon mac, so this will be difficult for me to reproduce or fix. If you are able to contribute a fix, this would be very much appreciated! As a pointer, the windows backend gets the app ID directly from desktop-notifier/src/desktop_notifier/winrt.py Lines 72 to 74 in adebc84
The documentation for |
Looks like a general Windows bug. One of my users also got this- iamkroot/trakt-scrobbler#224 Will try to debug in Windows if I get some time. |
Looks like the winrt API changed slightly during the last couple of release (it is still in beta, so I don't blame them). I've made adjustments accordingly and released v3.4.2.dev0 of |
Sorry for being late to reply. Is there any way to use |
Notification failed
Traceback (most recent call last):
File "C:\Users\ilker\Desktop\dev\env-trash\desktop-notifier\venv\lib\site-packages\desktop_notifier\base.py", line 207, in send
platform_nid = await self._send(notification, notification_to_replace)
File "C:\Users\ilker\Desktop\dev\env-trash\desktop-notifier\venv\lib\site-packages\desktop_notifier\winrt.py", line 128, in _send
await self._request_background_task_access()
File "C:\Users\ilker\Desktop\dev\env-trash\desktop-notifier\venv\lib\site-packages\desktop_notifier\winrt.py", line 97, in _request_background_task_access
tasks = BackgroundTaskRegistration.get_all_tasks()
OSError: [WinError -2147023728] Eleman bulunamadı ((Child not found in english))
Note: I also used the basic notification toast with hacky id and any string values # using hacky _appid
await notifier.send(
title="Julius Caesar",
message="Et tu, Brute?",
) I had to use the hacky id to run the toast. This is the only way i can get it work. |
Ah, I see, you are practically impersonating another app to show notifications. I expect that Windows has similar policies as macOS around only allowing proper "applications" to send desktop notifications, but with a lot weaker enforcement of those policies. How did you install Python? When using the official installer from python.org, it should behave properly with an App ID of "Python". Likewise, if you use This error should definitely be handled more gracefully with a better error message so that users understand what is going on. |
I used python.org for windows indeed. I am using Virtualenv, may be that is the case idk. |
@samschott
(from iamkroot/trakt-scrobbler#224 (comment)) To repro, |
Darn, looks like this was a stupid oversight of me. |
What I Did
I tried to run basic example on README
Result
Parametre hatalı -> The parameter is incorrect (in english)
The text was updated successfully, but these errors were encountered: