Skip to content

OSError: [WinError -2143420155] Notification platform not available #178

@Macktireh

Description

@Macktireh
  • Desktop Notifier version: 5.0.1
  • Python version: 3.12.3
  • Operating System: Windows 11

Description

I tested the sample code provided in the documentation (README):

import asyncio

from desktop_notifier import DesktopNotifier

notifier = DesktopNotifier()


async def main() -> None:
    await notifier.send(title="Hello world!", message="Sent from Python")


if __name__ == "__main__":
    asyncio.run(main())

Output:

Traceback (most recent call last):
  File "E:\develop\projects\side\AutomateRDVPref\app.py", line 5, in <module>
    notifier = DesktopNotifier()
               ^^^^^^^^^^^^^^^^^
  File "E:\develop\projects\side\AutomateRDVPref\.venv\Lib\site-packages\desktop_notifier\main.py", line 165, in __init__
    self._impl = impl_cls(app_name, notification_limit)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\develop\projects\side\AutomateRDVPref\.venv\Lib\site-packages\desktop_notifier\winrt.py", line 100, in __init__
    notifier = self.manager.create_toast_notifier(self.app_id)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError -2143420155] Notification platform not available

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions