/Users/duan./PycharmProjects/pythonProject1/venv/bin/python /Users/duan./PycharmProjects/pythonProject1/123213231.py
Traceback (most recent call last):
File "", line 8, in forward
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/turtle.py", line 1637, in forward
self._go(distance)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/turtle.py", line 1605, in _go
self._goto(ende)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/turtle.py", line 3176, in _goto
screen._drawline(self.drawingLineItem,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/turtle.py", line 545, in _drawline
self.cv.coords(lineitem, *cl)
File "", line 1, in coords
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/init.py", line 2761, in coords
self.tk.call((self._w, 'coords') + args))]
_tkinter.TclError: invalid command name ".!canvas"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/duan./PycharmProjects/pythonProject1/123213231.py", line 2, in
t.forward(100)
File "", line 12, in forward
turtle.Terminator
Process finished with exit code 1
你python的版本是不是2+?
同问,楼主解决了吗