【发布时间】:2021-03-22 11:18:02
【问题描述】:
我正在尝试创建一个以 png 照片为形状的海龟。 我试过用这个方法:
import turtle
screen = turtle.Screen()
image = ("rocketship.png")
screen.addshape(image)
turtle.shape(image)
但是它显示了这个:
File "C:\Users\Drukker\AppData\Local\Programs\Python\Python39\Among_us.py", line 10, in <module>
screen.addshape(image)
File "C:\Users\Drukker\AppData\Local\Programs\Python\Python39\lib\turtle.py", line 1136, in register_shape
raise TurtleGraphicsError("Bad arguments for register_shape.\n"
turtle.TurtleGraphicsError: Bad arguments for register_shape.
Use help(register_shape)```
Does anyone know a solution?
Thanks
【问题讨论】:
标签: python turtle-graphics python-turtle