0

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.
  • maybe this [link](https://stackoverflow.com/questions/11176638/tkinter-tclerror-error-reading-bitmap-file) would help – FrainBr33z3 Aug 04 '21 at 06:52
  • Does this answer your question? [tkinter TclError: error reading bitmap file](https://stackoverflow.com/questions/11176638/tkinter-tclerror-error-reading-bitmap-file) – imxitiz Aug 04 '21 at 14:31

0 Answers0