OSError: [Errno 8] Exec format error: 'geckodriver' when trying to open firefox using selenium in python

后端 未结 2 1990
借酒劲吻你
借酒劲吻你 2021-01-13 02:04
from selenium import webdriver

browser = webdriver.Firefox(executable_path=\"/usr/bin/geckodriver\")
browser.get(\'http://www.ubuntu.com/\')

The e

相关标签:
2条回答
  • 2021-01-13 02:30

    Please, address geckodriver.exe rather than geckodriver like this:

    from selenium import webdriver
    browser = webdriver.Firefox(executable_path=r"usr/bin/geckodriver.exe")
    browser.get('http://www.ubuntu.com/')
    
    0 讨论(0)
  • 2021-01-13 02:37

    You have most probably installed a version of geckodriver that is meant for a different OS/platform! get the correct version from https://github.com/mozilla/geckodriver/releases and replace the one you have.

    0 讨论(0)
提交回复
热议问题