Code
from tkinter import *
root = Tk()
1) root.iconbitmap("/home/inspiron/git_code/mp/images/m_player.ico")
2) root.iconbitmap("m_player.ico")
3) root.iconbitmap(r"m_player.ico")
root.mainloop()
All three lines are showing error: eg. error for case 2
Traceback (most recent call last):
File "music.py", line 5, in <module>
root.iconbitmap(r"m_player.ico")
File "/home/inspiron/anaconda3/lib/python3.7/tkinter/__init__.py", line 1868, in wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "m_player.ico" not defined
I wrote all the three lines just for asking, in the code I used them separately. I saw answers of same question asked, but none of them solved this issue. Also the file m_player.ico
is in the same folder in which music.py
is present.