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]: raise WebDriverException( selenium.common.exceptions.WebDriverException) #14213

Closed
skybird2022 opened this issue Jul 1, 2024 · 6 comments
Labels
I-defect I-logging Applied to issues where logging information would help troubleshoot

Comments

@skybird2022
Copy link

What happened?

Hi Support Team,

After I upgraded selenium version from 4.6.0 to 4.22.0 in Pycharm, it encountered following errors ( Please refer to attached screen captures with bugs) . I checked my local environment variable setting is no problem, and chromedriver version match with Google Chrome. I also open selenium-manager.exe, there is a error too. Can you help to check the root cause of these errors ? Thanks for support !

In order not to affect my daily work, I uninstall 4.22.0, and re-install temporarily 4.6.0 for workaround.

2
1
3

How can we reproduce the issue?

for example: 

from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')

Relevant log output

Traceback (most recent call last):
  File "G:\Python\lib\site-packages\selenium\webdriver\common\driver_finder.py", line 67, in _binary_paths
    output = SeleniumManager().binary_paths(self._to_args())
  File "G:\Python\lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 53, in binary_paths
    return self._run(args)
  File "G:\Python\lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 118, in _run
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: G:\Python\lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser chrome --language-binding python --output json; code: 3221225477
{}

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


Traceback (most recent call last):
  File "F:/Pycharm/Projects/aaa.py", line 8, in <module>
    driver = webdriver.Chrome()
  File "G:\Python\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
    super().__init__(
  File "G:\Python\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 50, in __init__
    if finder.get_browser_path():
  File "G:\Python\lib\site-packages\selenium\webdriver\common\driver_finder.py", line 47, in get_browser_path
    return self._binary_paths()["browser_path"]
  File "G:\Python\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

Operating System

Window 7

Selenium version

4.22.0

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

Chrome - 109.0.5414.120

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

ChromeDriver - 109.0.5414.25

Are you using Selenium Grid?

No

Copy link

github-actions bot commented Jul 1, 2024

@skybird2022, 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!

@diemol diemol added I-logging Applied to issues where logging information would help troubleshoot and removed needs-triaging labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

We need more information about this issue in order to troubleshoot.

Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our
Troubleshooting documentation.

@skybird2022
Copy link
Author

We need more information about this issue in order to troubleshoot.

Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our Troubleshooting documentation.

Hi Support Team, please refer to above "Relevant log output" details.

@diemol
Copy link
Member

diemol commented Jul 2, 2024

Check the link; it has instructions on how to enable debug logging.

Troubleshooting documentation.

@skybird2022
Copy link
Author

Check the link; it has instructions on how to enable debug logging.

Troubleshooting documentation.

Hi Diemol, I try to logging it according to your advise, it's not workable. I have find out the solution from official document. For higher version(4.6.0 or above ), I tested by using Service object to dedicate the path of chromedriver, it's workable. Therefore, seems there is no relationship between high-version and setting-driven environment variables.

Anyway, thanks for your support and prompt reply.

@diemol
Copy link
Member

diemol commented Jul 3, 2024

Thanks for letting us know.

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-defect I-logging Applied to issues where logging information would help troubleshoot
Projects
None yet
Development

No branches or pull requests

2 participants