【发布时间】:2020-10-22 22:46:11
【问题描述】:
我使用的是 Google Chrome 版本 83.0.4103.116 和 ChromeDriver 83.0.4103.39。我正在尝试在 google colab 中使用 chrome 驱动程序。我在google colab中上传后使用chromedriver的路径。你能指出我在哪里出错。 这是代码
import selenium
from selenium import webdriver
wd = webdriver.Chrome(r'/content/chromedriver.exe')
这是错误
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
75 stderr=self.log_file,
---> 76 stdin=PIPE)
77 except TypeError:
4 frames
PermissionError: [Errno 13] Permission denied: '/content/chromedriver.exe'
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
86 raise WebDriverException(
87 "'%s' executable may have wrong permissions. %s" % (
---> 88 os.path.basename(self.path), self.start_error_message)
89 )
90 else:
WebDriverException: Message: 'chromedriver.exe' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
【问题讨论】:
标签: python selenium google-chrome selenium-chromedriver google-colaboratory