jithurjacob / Windows-10-Toast-Notifications

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

pywintypes.error when not specify the icon path #37

Open Violet981 opened 6 years ago

Violet981 commented 6 years ago

I ran the code below, from win10toast import ToastNotifier toaster = ToastNotifier() toaster.show_toast("Hello World!!!", "Python is 10 seconds awsm!", icon_path=None, duration=10 ) I got the error below Traceback (most recent call last): File "D:\python_workspace\ding.py", line 6, in <module> duration=10 File "C:\Users\shi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\win10toast\__init__.py", line 98, in show_toast Shell_NotifyIcon(NIM_ADD, nid) pywintypes.error: (-2147467259, 'Shell_NotifyIcon', '未指定的错误') [Finished in 0.7s with exit code 1]

And, when I added threaded = True it told me TypeError: show_toast() got an unexpected keyword argument 'threaded'

It confused me because last time I ran the code, it was absolutely alright. :( Thanks a lot.

Violet981 commented 6 years ago

After I repairing the python environment, it works well. Maybe is the problem of python environment.