{"id":312,"library":"aiohappyeyeballs","title":"aiohappyeyeballs","description":"Happy Eyeballs for asyncio, currently at version 2.6.1. The library is actively maintained and facilitates easy connection establishment with fallback strategies using asyncio.","status":"active","version":"2.6.1","language":"python","source_language":"en","source_url":"https://github.com/aio-libs/aiohappyeyeballs","tags":["asyncio","network","resolution"],"install":[{"cmd":"pip install aiohappyeyeballs","lang":"bash","label":"Install aiohappyeyeballs"}],"dependencies":[],"imports":[{"note":"Avoid using direct import from the old module structure.","symbol":"HappyEyeballs","correct":"from aiohappyeyeballs import HappyEyeballs"}],"quickstart":{"code":"import asyncio\nfrom aiohappyeyeballs import HappyEyeballs\n\nasync def main():\n    resolver = HappyEyeballs()\n    addr = await resolver.resolve('example.com')\n    print(addr)\n\nasyncio.run(main())","lang":"python","description":"Basic usage of HappyEyeballs to resolve an address asynchronously."},"warnings":[{"fix":"Update import statements to use 'from aiohappyeyeballs import HappyEyeballs'.","message":"Import paths have changed in v2.5.0. Ensure you import using the new structure.","severity":"breaking","affected_versions":"<2.5.0"},{"fix":"Upgrade Python to 3.9.2 or higher.","message":"Python versions below 3.9.2 may lead to a TypeError during import.","severity":"gotcha","affected_versions":"<3.9.2"}],"env_vars":null,"last_verified":"2026-05-12T12:59:59.191Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Install the package using pip: 'pip install aiohappyeyeballs'.","cause":"The 'aiohappyeyeballs' package is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'aiohappyeyeballs'"},{"fix":"Ensure the correct import statement: 'from aiohappyeyeballs import start_connection'.","cause":"The function 'start_connection' is not found in the 'aiohappyeyeballs' module, possibly due to an incorrect import statement.","error":"ImportError: cannot import name 'start_connection' from 'aiohappyeyeballs'"},{"fix":"Provide the required argument when calling the function: 'socket = await start_connection(addr_infos)'.","cause":"The 'start_connection' function was called without the necessary 'addr_infos' argument.","error":"TypeError: start_connection() missing 1 required positional argument: 'addr_infos'"},{"fix":"Update `aiohappyeyeballs` to the latest version to get the fix: `pip install --upgrade aiohappyeyeballs`","cause":"This specific IndexError occurs in the `start_connection` method when socket creation fails with an exception other than an `OSError`, which was a known bug in older versions, particularly when `uvloop` was in use.","error":"IndexError: tuple index out of range (in start_connection method)"},{"fix":"Verify the target host's IP address and port are correct, ensure the server is running and accessible, and check for any firewall rules blocking the connection.","cause":"The `aiohappyeyeballs` library failed to establish a connection to the specified host and port because the target machine was unreachable or actively refused the connection (e.g., firewall, incorrect IP/port, server not running).","error":"OSError: [Errno 113] Connect call failed ('<IP_ADDRESS>', <PORT>)"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}