I had a fully working Python script using Selenium Webdriver,
pyvirtualdisplay, Xvfb wrapper and Firefox (Iceweasel/geckodriver) that scraped perfectly for me.
Only problem was the hardware this was working on was a Pi3. My Pi3 is now busy pretending to be an Amazon Alexa so I am trying to migrate the code to run on an old Pi Rev2 Model B. My Pi3 code created all sorts of errors (as you can imagine

) when I tried to run my 'working' Python script on the Pi Rev2 Model B so I decided to get something simpler working first and go back to basics and start with the simple code on this thread posted by @honda4life.
Code: Select all
from selenium import webdriver
from pyvirtualdisplay import Display
display = Display(visible=0, size=(800, 600))
display.start()
driver = webdriver.Firefox()
Error code I am getting is:
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 140, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 96, in start
self.assert_process_still_running()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11
My H/W is a 512kB RPi rev2 Model B
OS on 8GB Card is:
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
Python 2.7.9
Name: selenium
Version: 3.0.2
Location: /usr/local/lib/python2.7/dist-packages
and Geckodriver.exe is in /home/pi/Downloads and this path has been added to $PATH