【发布时间】:2016-02-05 08:26:52
【问题描述】:
我之前在Win7上写过一个网络爬虫,之前效果很好。但是,将系统更新到 Win10 后,我收到以下错误报告。你能给我一些解决这个问题的建议吗?
Traceback (most recent call last): File
"C:/Python27/study/study.py", line 4, in <module>
driver = webdriver.Firefox() File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
line 59, in __init__
self.binary, timeout), File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py",
line 47, in __init__
self.binary.launch_browser(self.profile) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
line 66, in launch_browser
self._wait_until_connectable() File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
line 105, in _wait_until_connectable
raise WebDriverException("Can't load the profile. Profile " WebDriverException: Message: Can't load the profile. Profile Dir: %s
If you specified a log_file in the FirefoxBinary constructor, check it
for details.
【问题讨论】:
-
你使用的是什么版本的硒?
-
您确定您的问题与 Win10 相关吗?通常,您在哪个平台上使用 Firefox 并不重要。对 Selenium 的行为几乎相同,无论您是在任何 Windows 版本、Mac 还是 Android 上运行 Firefox。
-
致kimmy:谢谢你们的cmets。我觉得你说得对,Buaban指出是firefox版本问题。