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