[issue27929] asyncio.AbstractEventLoop.sock_connect brooken for AF_BLUETOOTH

Robert Jordens report at bugs.python.org
Thu Sep 1 10:01:55 EDT 2016


Robert Jordens added the comment:

The error for inet_pton() is:

>>> import socket
>>> socket.inet_pton(socket.AF_BLUETOOTH, "00:12:34:56:78:99")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.error: [Errno 97] Address family not supported by protocol

And the traceback in asyncio is:

DEBUG:asyncio:Using selector: EpollSelector
Traceback (most recent call last):
  File "log.py", line 91, in <module>
    main()
  File "log.py", line 84, in main
    loop.run_until_complete(log(loop, sys.argv[1]))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "log.py", line 22, in log
    yield from loop.sock_connect(sock, (addr, 1))
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 397, in sock_connect
    yield from resolved
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27929>
_______________________________________


More information about the Python-bugs-list mailing list