4

I want to setup https://github.com/mukulhase/WebWhatsapp-Wrapper on my Raspberry Pi Zero W. I used this (https://www.raspberrypi.org/forums/viewtopic.php?t=167292#p1246095) as "tutorial" for installing Gecko Driver. Instead of

curl -O {link}

I used

wget {link}

because

tar -xzvf {file} 

didn't work for me.

At the moment when I wanted to open Firefox (you can see below in my code) it fails. I hope anybody could help me.

I tried to use another version of geckodriver but it didn't work, too.

>>> from selenium import webdriver
>>> browser = webdriver.Firefox()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
MelanX
  • 51
  • 1
  • 6

2 Answers2

4

This error message...

selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11

...implies that the subprocess exited and Status code was: -11

You need to download the latest matching geckodriver from Releases ยท mozilla/geckodriver.

As you are on Raspberry Pi Zero W you need to download geckodriver-v0.23.0-arm7hf.tar.gz and save it within your system. Additionally, you need to mention the absolute path of the geckodriver binary passing the argument executable_path as follows:

from selenium import webdriver

driver = webdriver.Firefox(executable_path='/path/to/geckodriver')
driver.get("http://google.com/")
driver.quit()

References

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0

Someone found out that the RasPi Zero uses arm6hf but I used geckodriver for arm7hf.

MelanX
  • 51
  • 1
  • 6