Skip to content

[🐛 Bug]: selenium.common.exceptions.SeleniumManagerException #15622

@ramack19

Description

@ramack19

Description

I have a new install of Debian 12 (Bookworm) amd64. I'm trying to run a .py that was converted from Python2 to Python3 a year or so ago. The conversion did work and I had been able to run the script without issue. The first several lines of the script are

#! python3
import time, os, datetime, selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By

# Open Firefox 
driver = webdriver.Firefox()
`
I am running Firefox-esr, not the package from Mozilla maybe that's the problem?

On this new install I am receiving the error(s) below:
$ python3 UpdateScheduleV02AP3.py
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 97, in start
    path = SeleniumManager().driver_location(browser)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 75, in driver_location
    str(self.get_binary()),
        ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 56, in get_binary
    raise SeleniumManagerException(f"{path} is missing.  Please open an issue on {tracker}")
selenium.common.exceptions.SeleniumManagerException: Message: /usr/lib/python3/dist-packages/selenium/webdriver/common/linux/selenium-manager is missing.  Please open an issue on https://github.com/SeleniumHQ/selenium/issues


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/MYUSER/Documents/UpdateScheduleV02AP3.py", line 21, in <module>
    driver = webdriver.Firefox() 
             ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/webdriver.py", line 194, in __init__
    self.service.start()
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 100, in start
    raise err
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 90, in start
    self._start_process(self.path)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 218, in _start_process
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 

I'm looking for the cause of that last error that references geckodriver, it's not in the Debian Repos that I've searched.

This is similar and reported here, but not solved:
#14400

Thanks...

Reproducible Code

This is a partial listing of the .py

#! python3
import time, os, datetime, selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By

# Open Firefox 
driver = webdriver.Firefox()

ℹ️ Last known working version: Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsD-firefoxI-defectSomething is not working as intendedJ-awaiting answerQuestion asked of user; a reply moves it to triage againOS-linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions