I have a problem with python idle not finding my image, I saved it in desktop as 'bg.png'
. python displayed it as an error for not finding the problem.
The error found was:
Traceback (most recent call last):
File "C:\Users\telta\Desktop\all stuff\stickman game.py", line 233, in
<module>
g=Game()
File "C:\Users\telta\Desktop\all stuff\stickman game.py", line 17, in __init__
self.bg = PhotoImage(file="bg.png")
File "C:\Users\telta\AppData\Local\Programs\Python\Python37- 32\lib\tkinter\__init__.py", line 3545, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Users\telta\AppData\Local\Programs\Python\Python37- 32\lib\tkinter\__init__.py", line 3501, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "bg.png": no such file or directory