Open evanAndersonDigipen opened 4 years ago
same - did you find a solution?
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!
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')
Could you share the code in here or in pastebin or the link to your github repo if it's public? ☺️
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')
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)```
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 gettoaster.show_toast("No Mans Sky", "Silver Deposit Ready", icon_path=r"icon.ico")
Thats the line