dispy
dispy copied to clipboard
Windows IPPROTO_IPV6
This is probably a newbie problem but running dispy on Windows 10 generated the following error:
2017-04-09 20:58:30 asyncoro - version 4.5.3 with IOCP I/O notifier 2017-04-09 20:58:30 dispy - dispy client version: 4.7.4 2017-04-09 20:58:30 asyncoro - uncaught exception in ~udp_server/1738960857128: Traceback (most recent call last): File "C:\Users\Think\Anaconda3\lib\site-packages\asyncoro_init_.py", line 3743, in _schedule retval = coro._generator.send(coro.value) File "C:\Users\Think\Anaconda3\lib\site-packages\dispy_init.py", line 804, in udp_server udp_sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) AttributeError: module 'socket' has no attribute 'IPPROTO_IPV6'
Thanks.
This stems from the removal of the calls to socket.gethostbyname() in dispy_init_.py
There seems to be some issue between IPv6 and IPv4 machines. From what I have seen, the current version works with all IPv6 machines and the previous version with all IPv4 machines. You could try if manually changing socket.getaddrinfo(socket.gethostname(), None)[0][0] to socket.getaddrinfo(socket.gethostbyname(socket.gethostname()), None)[0][0] in dispy_init_.py solves this issue for you.
@MagSc : Thank you for your post. I don't know what the issue is with 'socket' not having 'IPPROTO_IPV6' defined. However, gethostbyname is not supported with IPv6 so the change may not fix @dineshbvadhia's issue I think.
@MagSc : Does current not work for all IPv4 configurations? Can you give more details?
It turns out IPv6 with Windows required more work. It is fixed in latest release (4.7.5) and in current git head.