rPi3, Öffnen von Browser, Fehler

Python auf Einplatinencomputer wie Raspberry Pi, Banana Pi / Python für Micro-Controller
Antworten
prikol
User
Beiträge: 1
Registriert: Freitag 18. Mai 2018, 01:46

Hallo,
gedacht ist in einem Internerbrowser zwischen mehreren geöffneten Tabs zuwechseln.

Leider komme ich nicht weiter und bekomme beim Öffnen eine Browser den nachfolgenden Fehler angezeigt:

Code: Alles auswählen

root@raspberrypi:/home/pi/Downloads/test1# python t2.py
Traceback (most recent call last):
  File "t2.py", line 3, in <module>
    driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver')
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 76, in start
    stdin=PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
Und hier ist der Skript:

Code: Alles auswählen

import selenium.webdriver as webdriver 

driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver')
driver.get('http://www.google.com')
Was mache ich falsch? Wo ist der Fehler?

VG prikol
Benutzeravatar
__blackjack__
User
Beiträge: 14326
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

Wo kommt denn der ``chromedriver`` her und wie wurde der installiert?
„Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.“ — Brian W. Kernighan
Antworten