When i tried to change the tkinter icon with my favicon it threw an error.
code:
from tkinter import *
root = Tk()
root.iconbitmap('favicon.ico')
root.mainloop()
The following error is shown:
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 "favicon.ico" not defined
- The icon is in the same path as the .py file.
- Tried copying path of file and pasting.
- checked problem in many websites.