0

我正在尝试运行我和我的朋友用 python 制作的游戏......它是通过电子邮件发送给我的。我知道我有更新版本的 python,但我不确定这是否是问题所在。这是我们定义的函数:

def text(x,y,text,size):
    turtle.penup()
    turtle.goto(x,y)
    turtle.pendown()
    turtle.write(text,font=('Arial',size,'normal'))

我们在这里称它为:

def home_screen():
    turtle.bgpic("bgarmy.gif")
    turtle.fillcolor("#46B347")
    turtle.fill(True)
    rectangle(-150,100,300,100)
    turtle.fill(False)
    text(-70,130,"Epicry",30)
    turtle.fill(True)
    rectangle2(-100,0,200,50)
    turtle.fill(False)
    text(-35,10,"Start",20)
    turtle.fill(True)
    rectangle2(-100,-100,200,50)
    turtle.fill(False)
    text(-70,-90,"Instructions",20)
    turtle.listen()
    turtle.onscreenclick(onClick)
    turtle.mainloop()

当我尝试运行它时,我收到此错误:

Traceback (most recent call last):
File "C:\Python33\Lets Fight1\HomeScreen.py", line 2, in <module>
import movesoldier
File "C:\Python33\lib\idlelib\PyShell.py", line 60, in idle_showwarning
file.write(warnings.formatwarning(message, category, filename,
AttributeError: 'NoneType' object has no attribute 'write'

有谁知道这意味着什么?

4

0 回答 0