1

I am trying to do some web scraping using Selenium. This is being done on a Raspberry Pi where the default browser is Chromium. I need the WebDriver that will work with Chromium. Does ChromeDriver also work with Chromium because I have tried the ChromeDriver versions that are closest to my Chromium browser version (as the exact same one isn't listed) and it is not currently working but I don't know if this is to do with it being the wrong driver version or driver altogether?

I have currently tried to use the versions either side of my Chromium version for the ChromeDriver as there isn't one matching the exact Chromium version. The 2 versions I have tried are 78.0.3904.105 and 78.0.3904.70.

When I run my program it gives me an error of OSError: [Errno 8] Exec format error and I have my line of code written as driver = webdriver.Chrome(PATH).

Thanks.

Ratmir Asanov
  • 6,237
  • 5
  • 26
  • 40
dbhol
  • 41
  • 6
  • What makes you think this version would work when its an entire version above the current one? – dbhol May 24 '20 at 18:55
  • Does this answer your question? [Which ChromeDriver version is compatible with which Chrome Browser version?](https://stackoverflow.com/questions/41133391/which-chromedriver-version-is-compatible-with-which-chrome-browser-version) – tbhaxor May 24 '20 at 18:57
  • Ok well then if i work on the basis that the driver is working as it should, what would be causing the error i mentioned about? The driver is sitting in the pi directory so `/home/pi/chromedriver.exe` with my code reading `PATH = "/home/pi/chromedriver.exe"` – dbhol May 24 '20 at 19:15

2 Answers2

3

Ok so I'm going to answer my own question after now resolving it with a mix of the help from here and elsewhere. I found that the version of chromedriver i was using for linux was not supported as I am using a RaspberryPi which is arm based and the driver is 64bit based. I was provided with This link to github for an electron build of the driver which does support arm. The link goes to the page of the version i used (from december) and this driver has done the job for me. I did not remove chromium at all either. I hope this helps anyone else that may be running into the same issue

dbhol
  • 41
  • 6
0

You should have the chrome driver version matching your chrome / chromium browser

Releases of ChromeDriver: https://chromedriver.chromium.org/downloads

Make sure you add the downloaded executable to your PATH variable or you can specify the path while instancing the webdriver (passing the absolute path in path argument)

tbhaxor
  • 1,659
  • 2
  • 13
  • 43
  • I was meant to mention that my chromium version is `78.0.3904.108` and there is no driver version matching that – dbhol May 24 '20 at 19:01
  • @dbhol did you try this one https://chromedriver.storage.googleapis.com/index.html?path=78.0.3904.105/ – tbhaxor May 24 '20 at 19:33
  • Yes that is the one i am currently using on my PATH and i'm getting the `OSError: [Errno 8] Exec format error` error when trying to run the program – dbhol May 24 '20 at 19:35
  • @dbhol Then you should upgrade your chromebrowser to the latest version and use the latest chromedriver release only – tbhaxor May 24 '20 at 23:20
  • sudo apt-get install chromium-chromedriver – Allexj Nov 08 '22 at 18:15