dispy icon indicating copy to clipboard operation
dispy copied to clipboard

Windows IPPROTO_IPV6

Open dineshbvadhia opened this issue 8 years ago • 3 comments

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.

dineshbvadhia avatar Apr 09 '17 20:04 dineshbvadhia

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 avatar Apr 11 '17 09:04 MagSc

@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?

pgiri avatar Apr 11 '17 12:04 pgiri

It turns out IPv6 with Windows required more work. It is fixed in latest release (4.7.5) and in current git head.

pgiri avatar Apr 24 '17 02:04 pgiri