"getaddrinfo失败",这是什么意思? [英] "getaddrinfo failed", what does that mean?
本文介绍了"getaddrinfo失败",这是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
File "C:\Python27\lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args) gaierror: [Errno 11004]
getaddrinfo failed
从此处启动hello world示例时出现此错误:
Getting this error when launching the hello world sample from here:
推荐答案
这很可能意味着无法解析主机名.
It most likely means the hostname can't be resolved.
import socket
socket.getaddrinfo('localhost', 8080)
如果在此处不起作用,则在Bottle示例中将不起作用.如果出现问题,可以尝试使用"127.0.0.1"而不是"localhost".
If it doesn't work there, it's not going to work in the Bottle example. You can try '127.0.0.1' instead of 'localhost' in case that's the problem.
这篇关于"getaddrinfo失败",这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文