ValueError: unknown address family 10 | sockaddr = (inet_ntop(AF_INET6, res), port, 0, 0)

229 views
Skip to first unread message

Todd Wilson

unread,
May 21, 2012, 10:30:21 PM5/21/12
to gev...@googlegroups.com
On certain URLs, I get this error that I've been unable to solve:

  1. File "/usr/local/python27/lib/python2.7/site-packages/gevent/socket.py", line 637, in create_connection
  2.     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  3.   File "/usr/local/python27/lib/python2.7/site-packages/gevent/socket.py", line 777, in getaddrinfo
  4.     sockaddr = (inet_ntop(AF_INET6, res), port, 0, 0)
  5. ValueError: unknown address family 10
  6. <Greenlet at 0x2f37190: <bound method Request.send of <Request [GET]>>(prefetch=True)> failed with ValueError

Also:

>>> from gevent import socket
>>> socket.AF_INET6
10
>>> print socket.inet_ntop(socket.AF_INET6, '\0' * 16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unknown address family 10

 
This only occurs for me on CentOS 6.2. Any ideas what I'm missing?
 

Antonin AMAND

unread,
May 22, 2012, 8:42:53 AM5/22/12
to gev...@googlegroups.com
>
> This only occurs for me on CentOS 6.2. Any ideas what I'm missing?
>

What does the same code do if you import socket from standard python
socket module ?

Todd Wilson

unread,
May 22, 2012, 2:23:54 PM5/22/12
to gev...@googlegroups.com
Ah, oops. Does the same thing. Sorry for posting it here!

Any ideas?

Antonin AMAND

unread,
May 22, 2012, 9:23:07 PM5/22/12
to gev...@googlegroups.com
> Ah, oops. Does the same thing. Sorry for posting it here!
>
> Any ideas?

Python not compiled with ipv6 support ?
Reply all
Reply to author
Forward
0 new messages