首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >“may驱动程序”的可执行文件可能有错误的权限。请参阅https://sites.google.com/a/chromium.org/chromedriver/home

“may驱动程序”的可执行文件可能有错误的权限。请参阅https://sites.google.com/a/chromium.org/chromedriver/home
EN

Stack Overflow用户
提问于 2017-11-07 02:06:20
回答 22查看 132.2K关注 0票数 48

我环顾四周,查看了这两份文件,却没有找到答案。

我一直试图使用InstaPy,一个用于python的instagram api。在出现多个错误并假设InstaPy只是有一些问题之后,我尝试使用selinium对其进行原始编码。在插入示例代码并根据我的喜好对其进行修改后,我只需确保此代码能够正常工作。我收到了一个新的错误,而不是旧的错误,说权限可能不正确。我已经尝试重新安装和运行作为管理,但没有任何工作。我如何解决这个问题和/或这意味着什么?

代码:

代码语言:javascript
复制
import time
from selenium import webdriver

driver = webdriver.Chrome('C:\Webdrivers')  # Optional argument, if not specified will search path.
driver.get('http://www.google.com/xhtml');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
driver.quit()

错误:

代码语言:javascript
复制
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
    stdout=self.log_file, stderr=self.log_file)
  File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files (x86)\Python36-32\lib\subprocess.py", line 990, in _execute_child
    startupinfo)
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Webdrivers\RawBot.py", line 5, in <module>
    driver = webdriver.Chrome('C:\Webdrivers')  # Optional argument, if not specified will search path.
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
    self.service.start()
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 86, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'Webdrivers' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
EN

Stack Overflow用户

发布于 2020-02-29 19:52:10

找到已安装的driver.exe,单击shift+right,复制为路径,将其粘贴到IDE中

票数 0
EN
查看全部 22 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47148872

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档