I'm try to run the selenium python package in Debian 9 Stretch for web-scraping purposes; I installed such versions for the following softwares:
- Python 2.7.13 (with Pycharm 2018.2 Community Edition)
- Mozilla Firefox Quantum 61.0.1 (64 bit)
- Selenium 3.14 (with GeckoDriver v0.21.0)
When I try to call the web driver by running:
driver = webdriver.Firefox(executable_path="/home/quant/Documenti/Executable/geckodriver")
I get the following error message in the python console:
Traceback (most recent call last): File "", line 1, in File "/home/quant/Scrivania/BettingDataDownload/venv/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 167, in init keep_alive=True) File "/home/quant/Scrivania/BettingDataDownload/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 156, in init self.start_session(capabilities, browser_profile) File "/home/quant/Scrivania/BettingDataDownload/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 251, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/quant/Scrivania/BettingDataDownload/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute self.error_handler.check_response(response) File "/home/quant/Scrivania/BettingDataDownload/venv/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
What's wrong?
The path of the executable is correct and the file is executable; moreover, by adding the firefox_binary option to the webdriver.Firefox function as follows:
driver = webdriver.Firefox(firefox_binary="/snap/bin/firefox", executable_path="/home/quant/Documenti/Executable/geckodriver")
one gets the same error shown above.
Any help or suggestion will be appreciated. Thanks all.