代码:
import ColabTurtle.Turtle as tutel
tutel.initializeTurtle()
tutel.forward(10)
错误为:
<IPython.core.display.HTML object>
Traceback (most recent call last):
File "f:\stuff\e.py", line 3, in <module>
tutel.forward(10)
File "C:\Users\U.S.E.R\AppData\Local\Programs\Python\Python311\Lib\site-packages\ColabTurtle\Turtle.py", line 174, in forward
_moveToNewPosition(ending_point)
File "C:\Users\U.S.E.R\AppData\Local\Programs\Python\Python311\Lib\site-packages\ColabTurtle\Turtle.py", line 163, in _moveToNewPosition
_updateDrawing()
File "C:\Users\U.S.E.R\AppData\Local\Programs\Python\Python311\Lib\site-packages\ColabTurtle\Turtle.py", line 144, in _updateDrawing
raise AttributeError("Display has not been initialized yet. Call initializeTurtle() before using.")
AttributeError: Display has not been initialized yet. Call initializeTurtle() before using.
基本上,它告诉我在运行ColabTurtle函数之前使用intializeturtle(),只是我已经用过了。
帮帮我。
1条答案
按热度按时间ovfsdjhp1#
试着在Google Collab中运行它,如果不会有模块ColabTurtle,你需要创建一个新的代码(+code)并写