【发布时间】:2014-05-16 02:33:34
【问题描述】:
有人可以帮我解决这个错误吗?
import pygeoip
gi = pygeoip.GeoIP('GeoIP.dat')
print gi.country_code_by_name('specificdownload.com')
Traceback (most recent call last):
File "<module1>", line 14, in <module>
File "build\bdist.win-amd64\egg\pygeoip\__init__.py", line 447, in country_code_by_name
addr = self._gethostbyname(hostname)
File "build\bdist.win-amd64\egg\pygeoip\__init__.py", line 392, in _gethostbyname
return socket.gethostbyname(hostname)
gaierror: [Errno 11001] getaddrinfo failed
【问题讨论】:
-
您应该为这个问题添加更多上下文。代码是什么,至少你在哪个平台上试用它。
标签: python getaddrinfo