【发布时间】:2017-03-04 21:20:12
【问题描述】:
/usr/bin/python2.7 /home/USER/Documents/python/tools/swagSearcher/swagSearcher.py
Traceback (most recent call last):
File "/home/lyend/Documents/python/tools/swagSearcher/swagSearcher.py", line 6, in <module>
web = webdriver.Firefox() # This is the break/error point in my code
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x7f0a7e776c90>> ignored
Process finished with exit code 1
感谢您对此错误的任何帮助。 - 没有多少谷歌搜索让我找到解决方案
是的,我试过pip install -U selenium
附:基于Debian的操作系统
【问题讨论】:
-
你可以安装geckodriver,根据你的平台获取二进制dist,并确保它在PATH中。