ID EN
Socket

gaierror

Python 3.11

A subclass of OSError, this exception is raised for address-related errors by getaddrinfo() and getnameinfo(). The accompanying value is a pair (error, string) representing an error returned by a library call. string represents the description of error, as returned by the gai_strerror() C function. The numeric error value will match one of the EAI_* constants defined in this module.

Syntax

PYTHON
exception socket.gaierror

See Also

OSError getaddrinfo() getnameinfo() OSError