jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
964 stars 168 forks source link

Error when explorer.exe is not working #120

Open DZX66 opened 5 months ago

DZX66 commented 5 months ago

When I use show_toast() when explorer.exe is not working, it catches: Traceback (most recent call last): File "schoolpctool.py", line 567, in toaster File "win10toast__init__.py", line 146, in show_toast File "win10toast__init__.py", line 123, in _show_toast pywintypes.error: (-2147467259, 'Shell_NotifyIcon', 'Unspecified error')

After I restart explorer.exe and use show_toast(), it catches: Traceback (most recent call last): File "schoolpctool.py", line 567, in toaster File "win10toast__init__.py", line 146, in show_toast File "win10toast__init__.py", line 104, in _show_toast pywintypes.error: (1400, 'UpdateWindow', 'Invalid window handle')

How do I fix it, making it working when explorer.exe is running after it has crushed?