affaan-m/ECC · error · ValueError

remote import host could not be resolved: {parsed.hostname}

Error message

remote import host could not be resolved: {parsed.hostname}

What it means

Error "remote import host could not be resolved: {parsed.hostname}" thrown in affaan-m/ECC.

Source

Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:200

    if ".." in instinct_id:
        return False
    if instinct_id.startswith("."):
        return False
    return bool(re.match(r"^[A-Za-z0-9][A-Za-z0-9._-]*$", instinct_id))


def _validate_import_url(source: str) -> str:
    """Validate remote instinct imports before opening a network connection."""
    parsed = urllib.parse.urlparse(source)
    if parsed.scheme != "https":
        raise ValueError("remote instinct imports require https URLs")
    if not parsed.hostname:
        raise ValueError("remote import URL is missing a hostname")

    try:
        addr_infos = socket.getaddrinfo(parsed.hostname, parsed.port or 443, type=socket.SOCK_STREAM)
    except socket.gaierror as exc:
        raise ValueError(f"remote import host could not be resolved: {parsed.hostname}") from exc

    for family, _, _, _, sockaddr in addr_infos:
        host = sockaddr[0]
        try:
            ip = ipaddress.ip_address(host)
        except ValueError:
            continue
        if (
            ip.is_private
            or ip.is_loopback
            or ip.is_link_local
            or ip.is_multicast
            or ip.is_reserved
            or ip.is_unspecified
        ):
            raise ValueError(f"remote import host resolves to a non-public address: {host}")

    return urllib.parse.urlunparse(parsed)

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Verify the hostname is spelled correctly and resolvable (try: getent hosts <host> or nslookup <host>).
  2. Check DNS/network connectivity; in restricted environments, mirror the instinct file locally and import from disk.

Example fix

nslookup raw.example.com || curl -O https://reachable-mirror/instinct.md && instinct import ./instinct.md

When it happens

Trigger: Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:200 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/add6c33371247a15. Report an issue: GitHub.