Not sure why I'm getting an error I followed like 6 guides to make a .ico file and literally copied two tutorials trying all types of combinations of relative non relative file path
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title('Local Host Store')
root.geometry("500x500")
root.iconbitmap('pleasegod1.ico')
#mainloop
root.mainloop()
<ERROR CODE BELOW>
[Running] python -u "c:\Users\Eric\Desktop\LocalHostStore\main.py"
Traceback (most recent call last):
File "c:\Users\Eric\Desktop\LocalHostStore\main.py", line 10, in <module>
root.iconbitmap('pleasegod1.ico')
File "C:\Users\Eric\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 2071, in
wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "pleasegod1.ico" not defined
Try to type the entire image path or place the image in the same code file and make sure that the image type is .ico