0

I have written this code:

from plyer import notification
import time

def notifier():
    while True:
        notification.notify(
            title="Take a break",
            message="""It's been 20 minutes
Take a break
Take care of your eyes
            """,
            app_icon=r"C:\Users\DELL\PycharmProjects\myprojects\icon.ico",
            timeout=10
        )
        time.sleep(20*60)

if __name__ == "__main__":
    notifier()

Every time I run this it's showing:

Could not load icon C:\Users\DELL\PycharmProjects\myprojects\icon.ico 
6
  • Which filetypes does notify/plyer support?
    – Banana
    Commented May 24, 2020 at 16:48
  • 1
    First of all please show the full error, second make sure there is an icon.ico in that specific path
    – Tomerikoo
    Commented May 24, 2020 at 17:30
  • Yes, there is an icon.ico file Commented May 25, 2020 at 15:40
  • Is there any chance that icon.ico is just a JPG or PNG that has been renamed, rather than a genuine ICO format file? Commented Jul 13, 2020 at 19:09
  • What platform are you running this on? Commented Jul 13, 2020 at 19:17

1 Answer 1

1

Make sure this picture is converted into .ico by a converter, and not by simply renaming it while saving it to a PC. Also, double-check the path and name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.