jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
974 stars 169 forks source link

I have a valid ICO but it wont load #82

Open evanAndersonDigipen opened 4 years ago

evanAndersonDigipen commented 4 years ago

ERROR:root:Some trouble with the icon (E:\SilverAlerts\icon.ico): (0, 'LoadImage', 'No error message is available') As stated above, that is the error message i get toaster.show_toast("No Mans Sky", "Silver Deposit Ready", icon_path=r"icon.ico") Thats the line

ostap-tymchenko commented 4 years ago

same - did you find a solution?

CURVX commented 3 years ago

Mine is inside assets folder, not in root, so my path is assets\notify.ico

Here is the code snippet:

def notify(title, msg):
    toaster = ToastNotifier()
    toaster.show_toast(title,
                       msg,
                       icon_path='assets/notify.ico',
                       duration=2,
                       threaded=True
                       )

Hope this helped!

ostap-tymchenko commented 3 years ago

this doesn't work for me :( here's what i get :

ERROR:root:Some trouble with the icon (C:\Users\osty2\Documents\python\pyproj\mains\doing\atendance-app\notification-test\assets\1.ico): (0, 'LoadImage', 'No error message is available')

CURVX commented 3 years ago

Could you share the code in here or in pastebin or the link to your github repo if it's public? ☺️

ostap-tymchenko commented 3 years ago
from win10toast import ToastNotifier

def notify(title, msg):
    toaster = ToastNotifier()
    toaster.show_toast(title, msg, icon_path='assets/1.ico', duration=2, threaded=True)

notify(title='hi',msg='msg')
Stevesuk0 commented 1 year ago

import win10toast
toast = win10toast.ToastNotifier()
toast.show_toast("BiliBili Live Danmaku Notify", "test", "test.ico")```

Error:
```ERROR:root:Some trouble with the icon (D:\home\Desktop\wg\temp.ico): (0, 'LoadImage', 'No error message is available')
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)```