Windows XPでgeventがパッチされたurllib2でURLを開こうとしています:
from gevent import monkey
monkey.patch_all()
import urllib2
opener = urllib2.build_opener()
request = urllib2.Request("http://www.google.com")
response = opener.open(request)
opener.open
そして、通話中にこの例外が発生します。
File "C:\Python26\lib\site-packages\gevent\socket.py", line 768, in getaddrinfo
sockaddr = (inet_ntop(AF_INET6, res), port, 0, 0)
File "C:\Python26\lib\site-packages\gevent\socket.py", line 133, in inet_ntop
raise NotImplementedError('inet_ntop() is not available on this platform')
NotImplementedError: inet_ntop() is not available on this platform
<SERPScrapper at 0xbc0f60> failed with NotImplementedError
gevent socket.pyのソースコードを見ると、Windows上のIPV6に関連しているようです...
この問題を解決するためのアイデアや提案はありますか?
編集:他のURL(例:http: //www.bing.com )では問題は発生しません。グーグルはIPV6を使用しているようです。IPV4応答を強制する方法はありますか?