What does this socket.gaierror mean?

半城伤御伤魂 提交于 2019-11-27 14:34:13

It means that your given host name ' ' is invalid (gai stands for getaddrinfo()).

As NPE already states, maybe an empty string '' would be more appropriate than a space ' '.

The

HOST = ' '

should read

HOST = ''

(i.e. no space between the quotes).

The reason you're getting the error is that ' ' is not a valid hostname. In this context, '' has a special meaning (it basically means "all local addresses").

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!