如何解决“AttributeError:‘FirefoxProfile’对象没有属性‘功能’”EagleEye git

问题描述 投票:0回答:1
Traceback (most recent call last):
File "/home/blc/.local/lib/python3.11/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 "/home/blc/.local/lib/python3.11/site-packages/selenium/webdriver/common/selenium_manager.py", line 84, in driver_location
browser = options.capabilities["browserName"]
          ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FirefoxProfile' object has no attribute 'capabilities'

Traceback (most recent call last):
File "/home/blc/Tools/EagleEye/eagle-eye.py", line 229, in <module>
main(skipFB=args.skipfb, FBUrls=[], jsonRep=jsonRepFile, dockerMode=aDocker, dockerName=aName)
File "/home/blc/Tools/EagleEye/eagle-eye.py", line 99, in main
f.grabData()
File "/home/blc/Tools/EagleEye/grabber/facebook.py", line 16, in grabData
driver = cfg.getWebDriver()
         ^^^^^^^^^^^^^^^^^^
File "/home/blc/Tools/EagleEye/utils/config.py", line 45, in getWebDriver
return webdriver.Firefox(profile)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/blc/.local/lib/python3.11/site-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
self.service.path = DriverFinder.get_path(self.service, options)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/blc/.local/lib/python3.11/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
                                     ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FirefoxProfile' object has no attribute 'capabilities'

我正在尝试一个工具,eagleeye(github),当我尝试运行脚本时遇到问题?有人有主意吗?

python selenium-webdriver geckodriver
1个回答
0
投票

对我来说完全一样, Debian 12 将 geckodriver 更改为版本 17,因为我正在使用 Firefos ESR ,重新安装 selenium 包,webdriver 的路径在 config.json 中很好 ....仍然KO....

© www.soinside.com 2019 - 2024. All rights reserved.