I'm new to the turtle module and I'm having a problem while setting a background pic for my turtle project. when running this code:
import turtle as tr
import os
os.chdir(pathname)
tr.setup(400,400)
tr.bgpic("diamond.gif")
I get an error message for the 5th line ending with:
_tkinter.TclError: image "pyimage4" doesn't exist
Sometimes it's pyimage2
doesn't exist or pyimage36
. At each execution it changes.
I didn't find a real solution in other posts. Any help will be much appreciated.