在我的python代码中,我必须使用chromedriver的路径。我对chromedriver的路径很确定,但是它不起作用。
chromedriver是否可能无法正确安装?我怎么理解?我可以在相关文件夹中看到其图标
笔记本电脑上是否可能有另一个(主)chromedriver?我该如何检查?
这是代码:
driver = webdriver.Chrome('/home/kouhi/kouhi-company/chromedriverfolder')
错误是:
driver = webdriver.Chrome('/home/kouhi/kouhi-company/chromedriverfolder')
File "/home/kouhi/.local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/kouhi/.local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriverfolder' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home