[Twisted-Python] A non-blocking socket operation could not be completed immediately
Tommaso Mazzafico
tommaso.mazzafico at yahoo.com
Wed Nov 18 07:03:45 MST 2009
I tried this code:
-----------------------------------------
from twisted.spread import pb
from twisted.internet import reactor
class Echoer(pb.Root):
def remote_echo(self, s):
return s
if __name__ == "__main__":
reactor.listenTCP(8001, pb.PBServerFactory(Echoer()))
reactor.run()
-----------------------------------------
On Windows XP all is ok.
On Windows 7 64 I receive this error message:
-----------------------------------------
C:\Program Files (x86)\Python\lib\site-packages\twisted\spread\pb.py:30: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Traceback (most recent call last):
File "C:\Users\bob\Documents\Twisted\pbs.py", line 11, in <module>
reactor.listenTCP(8001, pb.PBServerFactory(Echoer()))
File "C:\Program Files (x86)\Python\lib\site-packages\twisted\internet\posixbase.py", line 356, in listenTCP
p.startListening()
File "C:\Program Files (x86)\Python\lib\site-packages\twisted\internet\tcp.py", line 862, in startListening
self._realPortNumber = skt.getsockname()[1]
File "<string>", line 1, in getsockname
socket.error: [Errno 10035] A non-blocking socket operation could not be completed immediately
-----------------------------------------
What can I do?
More information about the Twisted-Python
mailing list