0

次のようなエラーが常に発生しています。 NameError: name 'mouse' is not defined or NameError: name 'screen' is not defined, etc.

Python シェルでの完全なエラー メッセージは次のとおりです。 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] Python Type "help", "copyright", "credits" or "license" for more information. [evaluate ourGame.py] Traceback (most recent call last): File "/Volumes/PATRIOT/Our Game/ourGame.py", line 44, in <module> NameError: name 'mouse' is not defined

Python 2.7.8 32 ビット、Pygame 32 ビット、および Livewires ライブラリをインストールしました。

次の行で Livewires ライブラリをインポートしました。 from livewires.beginners import *

エラーが発生する場所は次のとおりです。 mouse.is_visible = False

Pygame または Livewires を適切にインストールしなかったことが原因である可能性がありますが、Python コマンド ウィンドウに次のように入力してもエラーは発生しません。

from livewires import beginners from livewires import games

4

0 に答える 0