uproot5 icon indicating copy to clipboard operation
uproot5 copied to clipboard

[MacOS] socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Open GaetanLepage opened this issue 7 months ago • 0 comments

When packaging the latest version (5.2.2) on nixpkgs, I noticed that the following tests were failing on MacOS (both x86_64 and aarch64) while they work fine on linux:

ERROR tests/test_0692_fsspec_writing.py::test_fsspec_writing_http - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
FAILED tests/test_0692_fsspec_reading.py::test_open_fsspec_ssh[FSSpecSource] - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
FAILED tests/test_0692_fsspec_reading.py::test_open_fsspec_ssh[None] - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
FAILED tests/test_0692_fsspec_writing.py::test_fsspec_writing_ssh[ssh://] - socket.gaierror: [Errno 8] nodename nor servname provided, or not known
FAILED tests/test_0692_fsspec_writing.py::test_fsspec_writing_ssh[simplecache::ssh://] - socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Here is the full stacktrace for one of them:

/nix/store/3c4cf1cinrh8lgqnx7vz9wbcm4rjirir-python3.11-paramiko-3.3.1/lib/python3.11/site-packages/paramiko/client.py:377: in connect
    to_try = list(self._families_and_addresses(hostname, port))
        allow_agent = True
        auth_strategy = None
        auth_timeout = None
        banner_timeout = None
        channel_timeout = None
        compress   = False
        disabled_algorithms = None
        errors     = {}
        gss_auth   = False
        gss_deleg_creds = True
        gss_host   = None
        gss_kex    = False
        gss_trust_dns = True
        hostname   = 'localhost'
        key_filename = None
        look_for_keys = True
        passphrase = None
        password   = None
        pkey       = None
        port       = 22
        self       = <paramiko.client.SSHClient object at 0x167642990>
        sock       = None
        timeout    = None
        transport_factory = None
        username   = '_nixbld1'
/nix/store/3c4cf1cinrh8lgqnx7vz9wbcm4rjirir-python3.11-paramiko-3.3.1/lib/python3.11/site-packages/paramiko/client.py:202: in _families_and_addresses
    addrinfos = socket.getaddrinfo(
        guess      = True
        hostname   = 'localhost'
        port       = 22
        self       = <paramiko.client.SSHClient object at 0x167642990>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

host = 'localhost', port = 22, family = <AddressFamily.AF_UNSPEC: 0>
type = <SocketKind.SOCK_STREAM: 1>, proto = 0, flags = 0

    def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
        """Resolve host and port into list of address info entries.
    
        Translate the host/port argument into a sequence of 5-tuples that contain
        all the necessary arguments for creating a socket connected to that service.
        host is a domain name, a string representation of an IPv4/v6 address or
        None. port is a string service name such as 'http', a numeric port number or
        None. By passing None as the value of host and port, you can pass NULL to
        the underlying C API.
    
        The family, type and proto arguments can be optionally specified in order to
        narrow the list of addresses returned. Passing zero as a value for each of
        these arguments selects the full range of results.
        """
        # We override this function since we want to translate the numeric family
        # and socket type values to enum constants.
        addrlist = []
>       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
E       socket.gaierror: [Errno 8] nodename nor servname provided, or not known

addrlist   = []
family     = <AddressFamily.AF_UNSPEC: 0>
flags      = 0
host       = 'localhost'
port       = 22
proto      = 0
type       = <SocketKind.SOCK_STREAM: 1>

GaetanLepage avatar Jan 26 '24 22:01 GaetanLepage