Python2.7具有TclError:无效的命令名称“ .55465160L”

时间:2019-04-02 11:54:43

标签: python-2.7

我运行我的代码,效果很好。

但是当我关闭python程序窗口时。它显示错误

我使用Python 2.7

首先以相反的顺序移动末端段

for index in range(len(segments)-1, 0, -1):
    x = segments[index-1].xcor()
    y = segments[index-1].ycor()
    segments[index].goto(x, y)





Error text:
Traceback (most recent call last):
 File "C:/Users/ICE/Desktop/6666663.py", line 152, in <module>
  segments[index].goto(x, y)
 File "C:\Python27\lib\lib-tk\turtle.py", line 1692, in goto
  self._goto(Vec2D(x, y))
 File "C:\Python27\lib\lib-tk\turtle.py", line 2991, in _goto
  screen._pointlist(self.currentLineItem),
 File "C:\Python27\lib\lib-tk\turtle.py", line 761, in _pointlist
  cl = self.cv.coords(item)
 File "<string>", line 1, in coords
 File "C:\Python27\lib\lib-tk\Tkinter.py", line 2305, in coords
  self.tk.call((self._w, 'coords') + args)))
 TclError: invalid command name ".55465160L"

0 个答案:

没有答案