Skip to content

macOS not fully supported #69

@mattdodge

Description

@mattdodge

I doubt this is an issue with this particular library but I am unable to get the server/client up and running because of it so I thought I'd log it here. Basically, when running ./server.py I see the following stack trace:

ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<Context.create_server_context() done, defined at /Users/matt/code/coap/aiocoap/aiocoap/protocol.py:530> exception=AttributeError("module 'socket' has no attribute 'IPV6_RECVPKTINFO'",)>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/Users/matt/code/coap/aiocoap/aiocoap/protocol.py", line 546, in create_server_context
    self.transport_endpoints.append((yield from TransportEndpointUDP6.create_server_transport_endpoint(new_message_callback=self._dispatch_message, new_error_callback=self._dispatch_error, log=self.log, loop=loop, dump_to=dump_to, bind=bind)))
  File "/Users/matt/code/coap/aiocoap/aiocoap/transports/udp6.py", line 126, in create_server_transport_endpoint
    return (yield from cls._create_transport_endpoint(new_message_callback, new_error_callback, log, loop, dump_to, bind))
  File "/Users/matt/code/coap/aiocoap/aiocoap/transports/udp6.py", line 100, in _create_transport_endpoint
    sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_RECVPKTINFO, 1)
AttributeError: module 'socket' has no attribute 'IPV6_RECVPKTINFO'

Sure enough, I'm unable to see that socket option on any of my Python 3 installs (3.4, 3.5, 3.6). On a different Ubuntu machine the option is there. I just updated the Mac today and I'm wondering if possibly they got rid of some setting from the C socket implementation.

Currently running macOS 10.12.4. Any ideas of how to get that option back or a workaround?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions