Package: python3-selenium Version: 4.13.0-1 Severity: normal X-Debbugs-Cc: d...@shallowsky.com
Dear Maintainer, The current selenium package fails to create either webdriver.Firefox() or webdriver.Chrome(). I have firefox, chromium, and geckodriver (downloaded from mozilla.org github) all in my path. The error is a KeyError: 'CONDA_PREFIX' because it's trying to access os.environ["CONDA_PREFIX"]. I don't have CONDA_PREFIX set because I don't use conda. I tried setting it to '' but I just got a slightly different error. I've tried setting the path to the firefox executable even though it's in my path, but it didn't help. selenium via pip install selenium works fine, at least for webdriver.Firefox() (webdriver.Chrome() eventually works but takes several minutes to pop up a window, I haven't looked into why) and doesn't give any errors regarding conda. Here's the full error message and how to reproduce it: >>> from selenium import webdriver >>> driver = webdriver.Firefox() Traceback (most recent call last): File "/usr/lib/python3/dist-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path path = SeleniumManager().driver_location(options) if path is None else path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 81, in driver_location args = [str(self.get_binary()), "--browser", browser] ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 60, in get_binary if not path.is_file() and os.environ["CONDA_PREFIX"]: ~~~~~~~~~~^^^^^^^^^^^^^^^^ File "<frozen os>", line 679, in __getitem__ KeyError: 'CONDA_PREFIX' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__ self.service.path = DriverFinder.get_path(self.service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/selenium/webdriver/common/driver_finder.py", line 41, in get_path raise NoSuchDriverException(msg) from err selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (600, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages python3-selenium depends on: ii python3 3.11.4-5+b1 ii python3-certifi 2023.7.22-1 ii python3-trio 0.22.2-1 ii python3-trio-websocket 0.10.3-1 ii python3-urllib3 1.26.16-1 Versions of packages python3-selenium recommends: ii chromium-driver 117.0.5938.132-2 python3-selenium suggests no packages. -- no debconf information