Приветствую,
буду благодарен если кто подскажет почему данный пример при старте выбрасывает такой эксепшн:
#!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = webdriver.FirefoxOptions()
options.set_preference("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36")
browser = webdriver.Firefox(options=options)
browser.get('https://ya.ru')
Получаю:
Traceback (most recent call last):
File "/home/tester/Desktop/arbnb_parser/./test_selenium.py", line 9, in <module>
browser = webdriver.Firefox(options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 67, in __init__
super().__init__(command_executor=executor, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
self.start_session(capabilities)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable
Имею:
inux dev 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
Python 3.10.12
geckodriver-v0.33.0-linux64 лежит в каталоге с .py скриптом
Mozilla Firefox 115.5.0esr (пробовал и последнюю версию)
selenium 4.15.2