Help with Chromium webdriver Selenium python3

Asked

Viewed 244 times

0

I recently fixed a pi4 Raspberry and installed the corresponding webdriver but it is giving an error.

ERROR

Traceback (most recent call last):
  File "Bump.py", line 4, in <module>
    from Modules.Login import *
  File "/media/pi/BB/Bump/Modules/Login.py", line 5, in <module>
    from utils.Driver import *
  File "/media/pi/BB/Bump/utils/Driver.py", line 15, in <module>
    browser = webdriver.Chrome(executable_path = f'/usr/lib/chromium-browser/chromedriver', chrome_options = chrome_options)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.35 (0),platform=Linux 4.19.57-v7l+ armv7l)

MY CODE

import selenium

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

from utils.ExtraVariables import *
from utils.json import *

#Driver info
chrome_options = Options()
chrome_options.add_extension('Driver/Extencions/anticaptcha-plugin_v0.3200.crx')
browser = webdriver.Chrome(executable_path = f'/usr/lib/chromium-browser/chromedriver', chrome_options = chrome_options)
browser.maximize_window()
browser.get('chrome://extensions/')

I already tried to give comment of the exhaustion that it does loading but it still doesn’t work and I don’t know what to do at this time!

  • executable_path = f'/usr/lib/chromium-browser/chromedriver already tried to put at the end of the directory to say that it is a file .exe

  • That worked out thank you!

1 answer

0

You forget to put the .exe at the end of executable_path the correct would be executable_path = f'/usr/lib/chromium-browser/chromedriver.exe

  • I put the Answer, just as a record.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.