Content-Length: 292235 | pFad | http://github.com/SeleniumHQ/selenium/issues/15622

6F [🐛 Bug]: selenium.common.exceptions.SeleniumManagerException · Issue #15622 · SeleniumHQ/selenium · GitHub
Skip to content

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

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
ramack19 opened this issue Apr 13, 2025 · 7 comments
Closed

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

ramack19 opened this issue Apr 13, 2025 · 7 comments
Labels
C-py Python Bindings D-firefox I-defect Something is not working as intended J-awaiting answer Question asked of user; a reply moves it to triage again OS-linux

Comments

@ramack19
Copy link

ramack19 commented Apr 13, 2025

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

@ramack19 ramack19 added A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended labels Apr 13, 2025
@selenium-ci
Copy link
Member

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

Selenium Triage Team: remember to follow the Triage Guide

@ramack19
Copy link
Author

ramack19 commented Apr 13, 2025

Here's the output while in Python3 after importing selenium and running the relevant code/line

>>> webdriver.Firefox()
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 "<stdin>", line 1, in <module>
  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. 

@cgoldberg
Copy link
Contributor

Did you install selenium from the Debian repos? If so, that's not the official package and I'm pretty sure it is broken.

The proper way to install the Python package is from PyPI:

https://pypi.org/project/selenium/

You can use pip or your preferred Python package manager (a virtual environment is recommended).

Installing it this way will include Selenium Manager, which will take care of installing geckodriver for you.

@cgoldberg cgoldberg added J-awaiting answer Question asked of user; a reply moves it to triage again C-py Python Bindings and removed A-needs-triaging A Selenium member will evaluate this soon! labels Apr 13, 2025
@ramack19
Copy link
Author

I have moved a little farther.
I downloaded the tarball from here:
https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz
unpacked it, and chmod'd it

# tar -xvzf geckodriver-v0.36.0-linux64.tar.gz
# chmod +x geckodriver

Then moved it to:
# mv geckodriver /usr/local/bin/

I'm now off to the next errors, ha ; ).

I'm marking this closed because the specific error is not occurring any longer.

@cgoldberg cgoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2025
@cgoldberg
Copy link
Contributor

@ramack19 don't try to manually install geckodriver like that. Follow my suggestion in my previous comment.

@ramack19
Copy link
Author

CG,
Ok thanks for the info. I had seen that URL in the Google hits, but wasn't sure it was valid or not. When trying to install with pip3, I receive the prompts below. I do have python3-full installed. The virtual environment threw me (not sure what that is) so I tried another option.

$ sudo -s pip3 install webdriver-firefox
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I'll look at the steps in your previous post. thank you!

@cgoldberg
Copy link
Contributor

cgoldberg commented Apr 13, 2025

@ramack19
Don't ever install Python packages using sudo... it's good that Debian is blocking you from doing that.

I have no idea what the webdriver-firefox package is or why you are trying to install it. The package you want is selenium, and it should be installed in a virtual environment.

Try this:

python3 -m venv venv
source venv/bin/activate
pip install selenium

Make sure you uninstall the version you installed from the Debian repos first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-py Python Bindings D-firefox I-defect Something is not working as intended J-awaiting answer Question asked of user; a reply moves it to triage again OS-linux
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/SeleniumHQ/selenium/issues/15622

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy