Selenium Unable to obtain driver for chrome (tested)

NoSuchDriverException: Unable to obtain driver for chrome means Selenium Manager could not find or download a browser and chromedriver; the Python message hides the reason. Run the bundled selenium-manager --browser chrome --debug to see it (exit code 65 = it failed), then fix the path or provide both binaries.

Since Selenium 4.6, webdriver.Chrome() runs Selenium Manager, a small binary shipped inside the Python package, to find a browser and a matching chromedriver. Most driver errors are Selenium Manager failing, and the Python exception hides why. The blocks below were run on a machine with no Chrome installed.

1. "Unable to obtain driver for chrome": a wrong binary_location

from selenium import webdriver
o = webdriver.ChromeOptions()
o.binary_location = "/opt/google/chrome/chrome-typo"
o.add_argument("--headless=new")
try:
    webdriver.Chrome(options=o)
except Exception as e:
    print(type(e).__name__ + ":", str(e).splitlines()[0][:300])

Output:

NoSuchDriverException: Message: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

NoSuchDriverException: Unable to obtain driver for chrome is what Python shows for any Selenium Manager failure. Here the cause is a binary_location that does not exist, but the message does not say so.

2. See the real reason: run Selenium Manager yourself (exit code 65)

import subprocess
from selenium.webdriver.common.selenium_manager import SeleniumManager
sm = str(SeleniumManager()._get_binary())
p = subprocess.run([sm, "--browser", "chrome", "--browser-path", "/opt/google/chrome/chrome-typo"],
                   capture_output=True, text=True)
print("exit code:", p.returncode)
print([l for l in (p.stdout + p.stderr).splitlines() if "ERROR" in l])

Output:

exit code: 65
['[2026-10-23T08:38:20.543Z ERROR] Browser path does not exist: /opt/google/chrome/chrome-typo']

Running the bundled binary with the same arguments shows the real error, Browser path does not exist, and exit code 65, the code reported in "Selenium Manager failed ... error code 65" messages. (_get_binary() is a private helper used here only to locate the bundled binary; you can also find it under site-packages/selenium/webdriver/common/<platform>/selenium-manager.) Add --debug to see every step: browser detection, version lookup, download URLs.

3. "cannot find Chrome binary": chromedriver given explicitly, no browser

import glob, os
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
drv = glob.glob(os.path.expanduser("~/.cache/selenium/chromedriver/linux64/*/chromedriver"))[0]
for binary in (None, "/opt/google/chrome/chrome-typo"):
    o = webdriver.ChromeOptions()
    o.add_argument("--headless=new")
    if binary:
        o.binary_location = binary
    try:
        webdriver.Chrome(service=Service(drv), options=o)
    except Exception as e:
        print(f"binary_location={binary!r}")
        print("  " + type(e).__name__ + ":", " | ".join(e.msg.splitlines()[:2]))

Output:

binary_location=None
  SessionNotCreatedException: session not created | from unknown error: cannot find Chrome binary; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#sessionnotcreatedexception
binary_location='/opt/google/chrome/chrome-typo'
  SessionNotCreatedException: session not created | from unknown error: no chrome binary at /opt/google/chrome/chrome-typo; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#sessionnotcreatedexception

If you pass a chromedriver path with Service(...), Selenium Manager is skipped and chromedriver itself looks for Chrome. With no Chrome installed it fails with session not created: cannot find Chrome binary; with a wrong binary_location the message is no chrome binary at <path>. Fix: install Chrome, point binary_location at an existing executable, or drop the explicit Service and let Selenium Manager handle it (next block).

4. With no options at all, Selenium Manager downloads Chrome for you

import os
from selenium import webdriver
o = webdriver.ChromeOptions(); o.add_argument("--headless=new")
d = webdriver.Chrome(options=o)          # no Chrome installed, no binary_location
print("started Chrome", d.capabilities["browserVersion"])
d.quit()
cache = os.path.expanduser("~/.cache/selenium")
for sub in ("chrome", "chromedriver"):
    print(sub, os.listdir(os.path.join(cache, sub, "linux64")))

Output:

started Chrome 156.0.8078.47
chrome ['156.0.8078.47']
chromedriver ['156.0.8078.47']

With no Chrome installed and no paths set, a plain webdriver.Chrome() worked: Selenium Manager downloaded Chrome for Testing and the matching chromedriver into ~/.cache/selenium (the browser took 403 MB there). This needs internet access on the first run and a writable home directory.

5. Offline or firewalled CI: "error managing chromedriver"

import os
os.environ["SE_CACHE_PATH"] = "/tmp/sl383/empty-cache"   # a cache with nothing downloaded yet
os.environ["SE_OFFLINE"] = "true"                         # like a CI box without internet
from selenium import webdriver
o = webdriver.ChromeOptions(); o.add_argument("--headless=new")
try:
    webdriver.Chrome(options=o)
except Exception as e:
    print(type(e).__name__ + ":", e.msg.splitlines()[0])

Output:

Unable to discover proper chromedriver version in offline mode
NoSuchDriverException: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

On a box without internet (simulated with SE_OFFLINE=true and an empty cache in SE_CACHE_PATH), Selenium Manager cannot look up a chromedriver version and Python again raises only Unable to obtain driver for chrome; the real reason is the warning logged just before it. Behind a proxy, give Selenium Manager its --proxy setting through the SE_PROXY environment variable (the same SE_ pattern as the two variables above); without internet, provide both binaries yourself:

import glob, os
os.environ["SE_OFFLINE"] = "true"
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
cache = os.path.expanduser("~/.cache/selenium")
drv = glob.glob(cache + "/chromedriver/linux64/*/chromedriver")[0]
chrome = glob.glob(cache + "/chrome/linux64/*/chrome")[0]
o = webdriver.ChromeOptions(); o.add_argument("--headless=new")
o.binary_location = chrome                       # an existing browser binary
d = webdriver.Chrome(service=Service(drv), options=o)   # explicit driver: Selenium Manager is skipped
print("started offline:", d.capabilities["browserVersion"])
d.quit()

Output:

started offline: 156.0.8078.47

With an explicit Service path and an existing binary_location, Selenium Manager is not needed, so this works fully offline. The chromedriver major version must match the browser's (both 156 here).

6. "error sending request for url": no route to the download server

import logging, os
os.environ["SE_CACHE_PATH"] = "/tmp/sl383/empty-cache2"     # nothing downloaded yet
os.environ["SE_PROXY"] = "http://127.0.0.1:8964"            # a proxy that is not running
logging.basicConfig(level=logging.WARNING, format="%(levelname)s %(name)s: %(message)s")
from selenium import webdriver
o = webdriver.ChromeOptions(); o.add_argument("--headless=new")
try:
    webdriver.Chrome(options=o)
except Exception as e:
    print(type(e).__name__ + ":", e.msg.splitlines()[0])

Output:

NoSuchDriverException: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
import subprocess
from selenium.webdriver.common.selenium_manager import SeleniumManager
sm = str(SeleniumManager()._get_binary())
p = subprocess.run([sm, "--browser", "chrome",
                    "--cache-path", "/tmp/sl383/empty-cache4",   # nothing downloaded yet
                    "--proxy", "http://127.0.0.1:8964"],         # a proxy that is not running
                   capture_output=True, text=True)
print("exit code:", p.returncode)
print([l for l in (p.stdout + p.stderr).splitlines() if "ERROR" in l])

Output:

exit code: 65
['[2026-10-23T08:46:07.611Z ERROR] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json)']

When Selenium Manager has to download (empty cache, no matching driver) but cannot reach googlechromelabs.github.io, Python again shows only Unable to obtain driver for chrome; the bundled binary reports error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json) and exit code 65. Here a proxy that is not running causes it; on real machines it is a corporate proxy, a firewall, or DNS. Set the right proxy with SE_PROXY, allow that host, or provide the binaries yourself as in block 5.

7. Checklist

Related: Selenium element not interactable, Selenium StaleElementReferenceException.

Frequently asked questions

What does Unable to obtain driver for chrome mean?

Selenium Manager, which Selenium 4.6+ runs to locate Chrome and chromedriver, failed. Common causes: a binary_location that does not exist, no internet to download a driver, or a cache it cannot write.

What is Selenium Manager error code 65?

The exit code Selenium Manager returns when it fails, e.g. 'Browser path does not exist'. Run it with --debug to see the error line.

How do I fix cannot find Chrome binary?

Install Chrome, set options.binary_location to an existing Chrome executable, or remove the explicit Service path so Selenium Manager can download Chrome for Testing.

Written with AI assistance. Measured on 2026-10-23 with Selenium 4.51.0 (Selenium Manager 0.4.51, Python 3.13.5) on Linux x86_64 without Chrome installed; Chrome for Testing 156.0.8078.47. Each block was run verbatim and the output pasted unedited. PlainHeaders is our extension; Python, Selenium and Chrome are free.