My VsCode isn't running any image, i don't know why, and this happens with jpg too. Here is my code:
from turtle import Turtle, Screen
screen=Screen()
screen.setup(600,600)
screen.bgpic(picname="olho.gif")
screen.exitonclick()
And the error is:
$ c:/Users/User/Desktop/ProgramasPython/venv/Scripts/python.exe c:/Users/User/Desktop/ProgramasPython/Cursopython/Day20/Day20.py
Traceback (most recent call last):
File "c:\Users\User\Desktop\ProgramasPython\Cursopython\Day20\Day20.py", line 5, in <module>
screen.bgpic(picname="olho.gif")
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\turtle.py", line
1482, in bgpic
self._bgpics[picname] = self._image(picname)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\turtle.py", line
478, in _image
return TK.PhotoImage(file=filename, master=self.cv)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 4064, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 4009, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "olho.gif": no such file or directory