SeleniumHQ/selenium · critical · WebDriverException

Unable to obtain working Selenium Manager binary; {path}

Error message

Unable to obtain working Selenium Manager binary; {path}

What it means

Raised by SeleniumManager._get_binary() as the final guard after the platform lookup, when the resolved path is None or does not point to an existing file. Unlike error 160 (which means the platform is unknown), this means the platform WAS recognized and a location WAS computed, but the actual binary file is absent from the installed package on disk.

Source

Thrown at py/selenium/webdriver/common/selenium_manager.py:122

            # in Python < 3.14, sys.platform appends version number to BSD platform names
            if platform_name.startswith("freebsd"):
                logger.warning(
                    "Selenium Manager binary may not be compatible with FreeBSD; you may need to run "
                    "'brandelf -t linux' on it and load linux64.ko"
                )
                platform_name = "freebsd"
            elif platform_name.startswith("openbsd"):
                logger.warning("Selenium Manager binary may not be compatible with OpenBSD; verify settings")
                platform_name = "openbsd"

            location = allowed.get((platform_name, arch))
            if location is None:
                raise WebDriverException(f"Unsupported platform/architecture combination: {sys.platform}/{arch}")

            path = Path(__file__).parent.joinpath(location)

        if path is None or not path.is_file():
            raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}")

        logger.debug(f"Selenium Manager binary found at: {path}")

        return path

    @staticmethod
    def _run(args: list[str]) -> dict:
        """Executes the Selenium Manager Binary.

        Args:
            args: the components of the command being executed.

        Returns:
            The log string containing the driver location.
        """
        command = " ".join(args)
        logger.debug("Executing process: %s", command)
        try:

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Reinstall selenium cleanly: pip install --force-reinstall selenium
  2. Set SE_MANAGER_PATH to a known-good selenium-manager binary to bypass the package lookup entirely.
  3. If using an editable/source checkout, build the package assets first or install a released wheel over it.
  4. Verify the expected path exists: ls py/selenium/webdriver/common/<platform>/selenium-manager and restore it if missing.

Example fix

# before — corrupted install, binary folder missing
#   -> Unable to obtain working Selenium Manager binary; .../linux/selenium-manager

pip install --force-reinstall selenium
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
import selenium.webdriver.common.selenium_manager as sm
binary = Path(sm.__file__).parent / 'selenium-manager'
if not binary.is_file() and not Path(sm.__file__).parent.joinpath('linux').is_dir():
    raise SystemExit('Selenium Manager binary missing; reinstall selenium or set SE_MANAGER_PATH')

Type guard

null

Try / catch

from selenium.common.exceptions import WebDriverException
try:
    driver = webdriver.Chrome()
except WebDriverException as e:
    if 'Unable to obtain working Selenium Manager binary' in str(e):
        import subprocess; subprocess.run(['pip','install','--force-reinstall','selenium'], check=True)

Prevention

When it happens

Trigger: A pip/wheel install where the platform subfolder (e.g. linux/, windows/, macos/) is missing or was stripped — common with --no-binary installs, editable installs from a source tree that never ran the packaging step, or a corrupted wheel. Also possible if the package directory was manually pruned.

Common situations: Installing selenium with 'pip install -e .' from a shallow clone without building assets, corporate artifact proxies that strip large binaries, Docker multi-stage builds that copy only .py files, and filesystem antivirus quarantining the unsigned executable.

Related errors


AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14). Data as JSON: /api/errors/8216120fda587798. Report an issue: GitHub.