我写了一个小型的IRC机器人,当我感到很沮丧时,我收到了一个我似乎无法理解的错误或修复。我使用的代码之前工作,但现在Windows似乎不满意它。Python套接字错误:[Errno 10013]尝试以访问权限的方式访问套接字
错误:
socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions
这是快速的代码,我敲了起来:
import socket
s = socket.socket().connect(("irc.cryto.net", 6667))
s.send("NICK kNij\r\n")
s.send("USER kNij 0 0 kNij :derp :3\r\n")
inputfile = s.makefile()
while 1:
line = inputfile.readline()
print line
编辑:这似乎是一个遍及问题,一些插座