Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Unable to obtain driver using Selenium Manager: C:\Users\mli86\Anaconda3\lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe is missing. Please open an issue on https://github.com/SeleniumHQ/selenium/issues #12084

Closed
plsfixthis opened this issue May 23, 2023 · 3 comments

Comments

@plsfixthis
Copy link

What happened?

There's an issue with my selenium where i'm unable to obtain the drive using selenium manager

How can we reproduce the issue?

webdriver_service = Service('C:\Desktop\chromedriver.exe')
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")  # Run in headless mode (without opening a browser window)
driver = webdriver.Chrome(service=webdriver_service, options=chrome_options)

Relevant log output

SeleniumManagerException                  Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_15428/3851760388.py in <module>
     61 
     62 # Initialize ChromeDriver with the configured options
---> 63 driver = webdriver.Chrome(service=webdriver_service, options=chrome_options)
     64 keyword_pattern = re.compile(r'gazette-listing', re.IGNORECASE)
     65 # Visit the URL

~\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
     80         if not service:
     81             service = Service(executable_path, port, service_args, service_log_path)
---> 82         service.path = DriverFinder.get_path(service, options)
     83 
     84         super().__init__(

~\Anaconda3\lib\site-packages\selenium\webdriver\common\driver_finder.py in get_path(service, options)
     41         except WebDriverException as err:
     42             logger.warning("Unable to obtain driver using Selenium Manager: " + err.msg)
---> 43             raise err
     44 
     45         return path

~\Anaconda3\lib\site-packages\selenium\webdriver\common\driver_finder.py in get_path(service, options)
     38     def get_path(service: Service, options: BaseOptions) -> str:
     39         try:
---> 40             path = shutil.which(service.path) or SeleniumManager().driver_location(options)
     41         except WebDriverException as err:
     42             logger.warning("Unable to obtain driver using Selenium Manager: " + err.msg)

~\Anaconda3\lib\site-packages\selenium\webdriver\common\selenium_manager.py in driver_location(self, options)
     75         browser = options.capabilities["browserName"]
     76 
---> 77         args = [str(self.get_binary()), "--browser", browser, "--output", "json"]
     78 
     79         if options.browser_version:

~\Anaconda3\lib\site-packages\selenium\webdriver\common\selenium_manager.py in get_binary()
     59         if not path.is_file():
     60             tracker = "https://github.com/SeleniumHQ/selenium/issues"
---> 61             raise SeleniumManagerException(f"{path} is missing.  Please open an issue on {tracker}")
     62 
     63         return path

SeleniumManagerException: Message: C:\Users\mli86\Anaconda3\lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe is missing.  Please open an issue on https://github.com/SeleniumHQ/selenium/issues

Operating System

Windows 10

Selenium version

Selenium 4.9.1

What are the browser(s) and version(s) where you see this issue?

Windows Edge

What are the browser driver(s) and version(s) where you see this issue?

Version 113.0.1774.50 (Official build) (64-bit)

Are you using Selenium Grid?

Not using selenium grid

@github-actions
Copy link

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


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@titusfortner
Copy link
Member

Yeah this is a duplicate of #11234
Anaconda does its own packaging, and we're not sure what needs to happen so that the binary we're including with Selenium wheel gets included by Anaconda as well.

stevetracvc added a commit to stevetracvc/selenium that referenced this issue Aug 11, 2023
conda doesn't seem to properly package selenium-manager, so it needs
to be install as a separate package (via conda). But this puts it in
the environment's bin folder.

This commit checks the path for the selenium-manager executable if
it isn't installed in the package's webdriver/common/<platform>/
folder.

fixes SeleniumHQ#11234 and SeleniumHQ#12084
stevetracvc added a commit to stevetracvc/selenium that referenced this issue Aug 14, 2023
conda doesn't seem to properly package selenium-manager, so it needs
to be install as a separate package (via conda). But this puts it in
the environment's bin folder.

This commit checks the path for the selenium-manager executable if
it isn't installed in the package's webdriver/common/<platform>/
folder.

fixes SeleniumHQ#11234 and SeleniumHQ#12084
titusfortner pushed a commit that referenced this issue Aug 15, 2023
* fix for conda install of selenium-manager

conda doesn't seem to properly package selenium-manager, so it needs
to be install as a separate package (via conda). But this puts it in
the environment's bin folder.

This commit checks the path for the selenium-manager executable if
it isn't installed in the package's webdriver/common/<platform>/
folder.

fixes #11234 and #12084

* fix linting error

* use conda bin folder, rather than searching PATH

* fix for tox/linting error
Copy link

github-actions bot commented Dec 9, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants