-
Notifications
You must be signed in to change notification settings - Fork 123
Description
The version of firefox cannot be detected. Trying with latest driver version
Traceback (most recent call last):
File "E:\软件\python\lib\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path
path = SeleniumManager().driver_location(options) if path is None else path
File "E:\软件\python\lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 97, in driver_location
options.binary_location = browser_path
File "E:\软件\python\lib\site-packages\selenium\webdriver\firefox\options.py", line 72, in binary_location
self.binary = value
File "E:\软件\python\lib\site-packages\selenium\webdriver\firefox\options.py", line 57, in binary
new_binary = FirefoxBinary(new_binary)
File "E:\软件\python\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 51, in init
"Failed to find firefox binary. You can set it by specifying "
selenium.common.exceptions.WebDriverException: Message: Failed to find firefox binary. You can set it by specifying the path to 'firefox_binary':
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary('/path/to/binary')
driver = webdriver.Firefox(firefox_binary=binary)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 7, in
from config import settings
File "E:\软件\电话轰炸\4-\buy_pig_plan_python\config.py", line 15, in
"driver":webdriver.Firefox(),
File "E:\软件\python\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 59, in init
self.service.path = DriverFinder.get_path(self.service, options)
File "E:\软件\python\lib\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path
raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using Selenium Manager.; For documentation on this error, please v
isit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location