测试积点老人 发表于 2020-7-3 15:40:39

导入selenium后,使用出错,困扰好久的问题,请求大佬帮助

Traceback (most recent call last):
File "C:/Users/东东/PycharmProjects/untitled/23.py", line 2, in <module>
    driver = webdriver.Firefox()
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\webdriver.py", line 77, in __init__
    self.binary, timeout),
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\extension_connection.py", line 49, in __init__
    self.binary.launch_browser(self.profile)
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 68, in launch_browser
    self._wait_until_connectable()
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 103, in _wait_until_connectable
    raise WebDriverException("Can't load the profile. Profile "
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.以上是报错信息,下面是我使用的一些版本 python 3.5.4 selenium2.48.0 firfox 35

https://img-bbs.csdn.net/upload/202006/20/1592645908_598879.png

bbtte 发表于 2020-7-3 17:14:23

:):):):)

郭小贱 发表于 2020-7-6 09:34:51

配置文件加载失败。检查下路径呢。

bellas 发表于 2020-7-6 09:48:23

来学习

qqq911 发表于 2020-7-6 10:19:51

配置文件地址检查下

jingzizx 发表于 2020-7-6 13:18:04

权限是否有问题

huling314 发表于 2020-7-10 17:10:08

先看下火狐浏览器是否是默认安装的,如果不是的话,需要修改配置路径
driver=webdriver.Firefox(executable_path="浏览器exe文件路径")
页: [1]
查看完整版本: 导入selenium后,使用出错,困扰好久的问题,请求大佬帮助