[🐛 Bug]: Unknown exceptions when start selenium
What happened?
My machine and version info:
lizhe@ori
OS: Manjaro 21.2.3 Qonos
Kernel: x86_64 Linux 5.15.16-1-MANJARO
Uptime: 5h 55m
Packages: 1440
Shell: python
Resolution: 3840x1080
DE: KDE 5.90.0 / Plasma 5.23.5
WM: KWin
GTK Theme: Breeze [GTK2/3]
Icon Theme: breeze-dark
Disk: 39G / 236G (17%)
CPU: Intel Core i7-7700K @ 8x 4.5GHz [50.0°C]
GPU: Intel Corporation HD Graphics 630 (rev 04)
RAM: 9835MiB / 15866MiB
Python 3.10.2
selenium version 4.1.0
I just run a basic code
from selenium import webdriver
options = webdriver.ChromeOptions()
driver = webdriver.Chrome()
url = "https://www.google.com"
driver.get(url)
input("please wait...")
Error msg in pycharm:
/usr/bin/python3 /home/lizhe/Applications/pycharm-2021.3.1/plugins/python/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 41933 --file /home/lizhe/OriNote/wikiScripts/VoiceCommand.py Connected to pydev debugger (build 213.6777.50) Traceback (most recent call last): File "/home/lizhe/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 93, in init RemoteWebDriver.init( File "/home/lizhe/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 268, in init self.start_session(capabilities, browser_profile) File "/home/lizhe/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 359, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/lizhe/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute self.error_handler.check_response(response) File "/home/lizhe/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 211, in check_response raise exception_class(value) selenium.common.exceptions.WebDriverException: Message: python-BaseException Process finished with exit code 1
I try to use firefox instead of Chrome, same error. Thing is there is no error message shows out. So how to fix it?
How can we reproduce the issue?
Follow my setting above.
Relevant log output
Already pasted
Operating System
Manjaro 21
Selenium version
4.1.0
What are the browser(s) and version(s) where you see this issue?
Google Chrome 97.0.4692.99
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 97.0.4692.71 (adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247})
Are you using Selenium Grid?
no
@woshichuanqilz, 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, 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!
This error message has been reported when Selenium can't find the driver. Are you putting the drivers in a location that is in PATH? There are multiple ways to ensure the proper driver is being used, see: https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/
This error message has been reported when Selenium can't find the driver. Are you putting the drivers in a location that is in PATH? There are multiple ways to ensure the proper driver is being used, see: https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/
It is not a path issue, I already put the chromedriver in PATH, even I use webdriver.Chrome(executable_path='/home/lizhe/Applications/chromedriver', options=options) . Also get the same error
@woshichuanqilz I couldn’t reproduce this error. I used selenium 4.1.0 with python 3.10.2 and Chrome 97 on MacOS Sierra since Manjaro 11 was not available to me.
Can you please verify that drivers are in $PATH by typing chromedriver or geckodriver in the shell?
This should spin up a server like mentioned below.

If that is working fine. I think there must be some issue specific to Manjaro or sometimes python too behave little bit weird So try running that in a Virtual Environment.
@woshichuanqilz I can also see that this works fine in Ubuntu, we do not have a Manjaro 11 VM to check this. So please check if this works for you on Ubuntu because it might be an issue with that OS.
- +1 I have the same error on my Windows machine Python version: 3.9.12 Chrome webdriver version: https://chromedriver.storage.googleapis.com/index.html?path=100.0.4896.60/ Windows 10
import time
from selenium import webdriver
driver = webdriver.Chrome(executable_path='C:\\Users\\test\\chromedriver_win32\\chromedriver.exe')
driver.get('http://www.google.com/')
raceback (most recent call last):
File "C:\Users\test\Documents\fax2mail-automation\test.py", line 4, in <module>
driver = webdriver.Chrome(executable_path='C:\\Users\\test\\chromedriver_win32\\chromedriver.exe') # Optional argument, if not specified will search path.
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\chromium\webdriver.py", line 93, in __init__
RemoteWebDriver.__init__(
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 269, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 360, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute
self.error_handler.check_response(response)
File "C:\Users\test\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 211, in check_response
raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: <!DOCTYPE html>
<HTML>
@vedhaperi can you share the whole stacktrace? It seems to be incomplete. It is also not clear what version of Selenium you are using.
Closing since we are not getting more information.
But the problem is still there I'm getting exactly the same problem, I tried to troubleshot it for several hours but I have no clue what is the problem
@Joyen12 Can you please share the example code and complete traceback with details like
- selenium version
- BrowserName and version
- webdriver version
- OS details
These details will help us better understand the issue. We have closed this issue because we were not able to reproduce this issue and there was no further response from the author.
Thanks!
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.