Adding a turtle screen to a tkinter widget not working

1 day ago 7
ARTICLE AD BOX

I'm trying to have a turtle screen within a tkinter canvas as part of my coding project, but I keep getting the error message "AttributeError: 'Toplevel' object has no attribute 'call' "

import turtle from tkinter import * from turtle import RawTurtle, TurtleScreen window = Toplevel() def startlesson(): for i in range(7): window.rowconfigure(i, weight = 1) for i in range(9): window.columnconfigure(i, weight=1) instructionbox.destroy() StartButton.destroy() HelpButton.grid(row = 5, column = 0, sticky = 'e') GameImage = Canvas(window) GameImage.grid(row = 1, column = 3, rowspan = 4, columnspan = 5, sticky = 'nsew') turtle = RawTurtle(GameImage) screen = TurtleScreen(GameImage) window.mainloop()

Whenever I add the lines creating the turtle and the screen, I get the error. I'm very confused as according to all the examples of this I can find, this should work.

what am I missing for this to work?

Read Entire Article