Python IDLEエラー IDLE internal error in runcode()
2021/11/20
Pythonのお勉強を始めたばかりですが、IDLEを使ってprint関数で遊ぼうと思ったらエラーが出ました。
print関数だから出たエラーではなく、おそらく、それ以前の何かがおかしそうな気がします。
エラー内容
以下がエラー内容です。
IDLE internal error in runcode()
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\idlelib\rpc.py", line 342, in putmessage
r, w, x = select.select([], [self.sock], [])
TypeError: argument must be an int, or have a fileno() method.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\idlelib\rpc.py", line 243, in asyncqueue
self.putmessage((seq, request))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\idlelib\rpc.py", line 345, in putmessage
raise OSError("socket no longer exists")
OSError: socket no longer exists
はい、私には全く分かりません。以下の2文が気になります。
TypeError: argument must be an int, or have a fileno() method.
引数はintじゃなきゃダメですよ。もしくは、fileno()メソッドじゃなきゃダメですよ。一体何の引数の話をしているのでしょう。
OSError: socket no longer exists
ソケットはもう存在しません。なるほど?良く分かりません。
とりあえずRepairする
インストールして、アンインストールして、再インストールした経緯があるので、とりあえずexeを使ってRepairをしてみようと思います。
直りました
なんとなくエラーへの根本対処ができた気がしてないのですが、とりあえず直ったので良しとします。