Skip to content

[🐛 Bug]: selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome #15706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MatejVitek opened this issue May 6, 2025 · 2 comments
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-py Python Bindings D-chrome I-defect Something is not working as intended OS-windows

Comments

@MatejVitek
Copy link

MatejVitek commented May 6, 2025

Description

I'm trying to open Google Chrome through Selenium but the manager isn't downloading the driver automatically as it's supposed to.

I've tried to turn on logging as specified in the instructions, but the log file remained empty after running the below code. A stack trace is produced, however:

Traceback (most recent call last):
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 67, in _binary_paths
	output = SeleniumManager().binary_paths(self._to_args())
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 47, in binary_paths
	args = [str(self._get_binary())] + args
				~~~~~~~~~~~~~~~~^^
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 99, in _get_binary
	raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}")
selenium.common.exceptions.WebDriverException: Message: Unable to obtain working Selenium Manager binary; C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\Synced Documents\2025\test.py", line 6, in <module>
	chrome = web.Chrome()
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
	super().__init__(
	~~~~~~~~~~~~~~~~^
		browser_name=DesiredCapabilities.CHROME["browserName"],
		^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	...<3 lines>...
		keep_alive=keep_alive,
		^^^^^^^^^^^^^^^^^^^^^^
	)
	^
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in __init__
	if finder.get_browser_path():
	~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 47, in get_browser_path
	return self._binary_paths()["browser_path"]
		~~~~~~~~~~~~~~~~~~^^
File "C:\Users\user\mamba\envs\script\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 78, in _binary_paths
	raise NoSuchDriverException(msg) from err
selenium.common.exceptions.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

I'm using Windows 11 with a conda (mamba) installation, Python 3.13, and the most recent Selenium versions available:

(script) PS D:\Synced Documents\2025> mamba list selenium
List of packages in environment: "C:\\Users\\user\\mamba\\envs\\script"

Name              Version  Build         Channel
--------------------------------------------------------
selenium          4.32.0   pyhe01879c_0  conda-forge
selenium-manager  4.32.0   h63977a8_0    conda-forge

I have the most recent Chrome version installed on my system (136.0.7103.93). However, I had the same issue a year ago, so I doubt it's version-specific. At that point, I swapped back to using from webdriver_manager.chrome import ChromeDriverManager.

Reproducible Code

from selenium import webdriver as web
import logging
logger = logging.getLogger('selenium')
logger.addHandler(logging.FileHandler('selenium.log'))
logger.setLevel(logging.DEBUG)
chrome = web.Chrome()
chrome.get('https://www.google.com')
@MatejVitek MatejVitek added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels May 6, 2025
@selenium-ci
Copy link
Member

@MatejVitek, thank you for creating this issue. We will troubleshoot it as soon as we can.

Selenium Triage Team: remember to follow the Triage Guide

@titusfortner
Copy link
Member

It's a known issue that Selenium Manager does not work with package managers like conda - https://www.selenium.dev/documentation/selenium_manager/#custom-package-managers

If you are using a Linux package manager (Anaconda, snap, etc) that requires a specific driver be used for your browsers, you’ll need to either specify the driver location, the browser location, or both, depending on the requirements.

@titusfortner titusfortner closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-py Python Bindings D-chrome I-defect Something is not working as intended OS-windows
Projects
None yet
Development

No branches or pull requests

3 participants