tkinter iconbitmap not defined in chromebook

Viewed 78
from tkinter import *
from tkinter import font
root =Tk()
root.title("Imagess..")
root.iconbitmap('myicon.ico')
root.mainloop()

** 'myicon.ico' file is located in "PythonProjects" where the "Images.py" is saved.

Here's what my terminal says::

spyder@penguin:~/PythonProjects$ /bin/python3  /home/spyder/PythonProjects/Images.py
Traceback (most recent call last):
  File "/home/spyder/PythonProjects/Images.py", line 8, in <module>
    root.iconbitmap(icon)
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2080, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "/home/spyder/PythonProjects/myicon.ico" not defined

Please, help me through this **

0 Answers
Related