Answer the question
In order to leave comments, you need to log in
How to fix error in socket.getaddrinfo()?
I get an error when I want to get ip from a domain
import socket
ip_new = socket.getaddrinfo(address, port)[0][4][0]
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question