Skip to content

Version 1.3.1 seems broken on Windows 11 #201

@jay-ramani

Description

@jay-ramani

Hello @DatGuy1,

I've been getting an error ModuleNotFoundError: No module named 'winrt._winrt' error after upgrading my pip installed packages.

If it helps, a bit more detail up the stack is as follows

    from windows_toasts import Toast, WindowsToaster
  File "C:\Program Files\Python\Lib\site-packages\windows_toasts\__init__.py", line 13, in <module>
    from .events import ToastActivatedEventArgs, ToastDismissalReason, ToastDismissedEventArgs, ToastFailedEventArgs
  File "C:\Program Files\Python\Lib\site-packages\windows_toasts\events.py", line 6, in <module>
    from winrt import system
  File "C:\Program Files\Python\Lib\site-packages\winrt\system\__init__.py", line 5, in <module>
    from winrt._winrt import (
    ...<34 lines>...
    )
ModuleNotFoundError: No module named 'winrt._winrt'

I can swear I had winrt installed and toasts were fine until the upgrade of all my pip packages. On attempting to "re-install" winrt, I'm getting this error:

pip install winrt
ERROR: Could not find a version that satisfies the requirement winrt (from versions: none)
ERROR: No matching distribution found for winrt

I did a bit of digging around, and looks like Microsoft has stopped updating its winrt package.

Source: https://stackoverflow.com/questions/69610231/why-cant-pip-find-winrt.

Note: Please read the comments in full under the accepted answer, where the author of the answer conclusively says there are no more updates with winrt. I checked Microsoft's repository as well (including the xlang repository), and true to the comment on the Stack Overflow thread above, there seem to be no updates.

Would appreciate if you could confirm Windows-Toasts is in a working state, and if it is, what can I do to get around the winrt error above? If not, I'm wondering where this leaves us with a dysfunctional winrt, and if there are other alternatives.

If there are others who were able to get around the issue, do holler on how you got it working.

Thanks for the time and patience, in any case. Cheers.

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