0

I am trying to get Selenium (v. 4.35.0) working on my headless Raspberry Pi.

I installed Chromium and Chromedriver on the Pi. In my usr/bin/ directory I have chromedriver, chromium, and chromium-browser.

Here's the code I have tried:

from selenium import webdriver

driver = webdriver.Chrome()

which throws NoSuchDriverException.

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service('/usr/bin/chromedriver')
driver = webdriver.Chrome(service=service)

which throws SessionNotCreatedException with the following stacktrace:

#0 0x555629968e28 <unknown>
#1 0x5556293ce524 <unknown>
#2 0x5556294054cc <unknown>
#3 0x555629400b00 <unknown>
#4 0x555629442e24 <unknown>
#5 0x5556294427a4 <unknown>
#6 0x55562940bbd4 <unknown>
#7 0x5556299351a4 <unknown>
#8 0x55562993812c <unknown>
#9 0x555629937d08 <unknown>
#10 0x555629920030 <unknown>
#11 0x5556299387a4 <unknown>
#12 0x55562990a010 <unknown>
#13 0x55562995686c <unknown>
#14 0x555629956a78 <unknown>
#15 0x555629967c08 <unknown>
#16 0x7fff2f71202c <unknown>
#17 0x7fff2f77bf58 <unknown>
7
  • always put full error message (traceback) because there are other useful information. Commented Sep 14 at 13:47
  • there is similar site for Raspberry Pi. There is also official forum Raspberry Pi Commented Sep 14 at 13:48
  • in question you could also add information which version of RPi you use and what system you have (Rasbian, Debian, etc.) and which version of this system you installed. Commented Sep 14 at 13:51
  • did you try with Firefox and geckodriver? Commented Sep 14 at 13:51
  • 1
    @furas , Selenium doesn't currently support installing or using chromedriver for Linux on ARM architecture. Commented Sep 16 at 11:56

1 Answer 1

0

You will need to run it or launch the browser in headless mode using driver options as I assume there is no GUI for your headless Raspberry Pi.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.