Forums

chrome is no longer running, so ChromeD river is assuming that Chrome has crashed

I run the code you suggested and it gives me the following error. Can you tell me what needs to be installed?

File "/home/Vladislav1989/like4like/main3.py", line 1, in <module>
    chrome_options = webdriver.ChromeOptions()
NameError: name 'webdriver' is not defined

if i run my code like this...

21:43 ~/like4like $ python main_twiter.py
The chromedriver version (90.0.4430.24) detected in PATH at /usr/local/bin/chromedriver might not be compatible with the detected chrome version (11
6.0.5845.96); currently, chromedriver 116.0.5845.96 is recommended for chrome 116.*, so it is advised to delete the driver in PATH and retry
Traceback (most recent call last):
  File "/home/Vladislav1989/like4like/main_twiter.py", line 20, in <module>
    driver = webdriver.Chrome(options=chrome_options)
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
    super().__init__(
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 206, in __init__
    self.start_session(capabilities)
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 290, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 345, in execute
    self.error_handler.check_response(response)
  File "/home/Vladislav1989/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /home/Vladislav1989/.cache/selenium/chrome/linux64/116.0.5845.96/chrome is no longer running, so ChromeD
river is assuming that Chrome has crashed.)
Stacktrace:
#0 0x55bbaa20ce89 <unknown>

Can you show us the code with all important bits (imports, browser settings)?