鴆川傲 2021-02-13 02:44 采纳率: 100%
浏览 376
已采纳

调用selenium打开chrome浏览器失败

python调用不起来chrome

  1. 调用selenium打开chrome浏览器失败

报错如下

Traceback (most recent call last):
  File "C:\Users\Z\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\common\service.py", line 76, in start
    stdin=PIPE)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
PermissionError: [WinError 5] 拒绝访问。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#14>", line 1, in <module>
    driver = webdriver.Chrome(chrome_driver_binary,chrome_options = options)
  File "C:\Users\Z\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
    self.service.start()
  File "C:\Users\Z\AppData\Roaming\Python\Python37\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: 'Python37_86' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

  • 写回答

1条回答 默认 最新

  • zerobyte_ 2021-02-27 11:46
    关注

    第一可能是webdriver的版本和浏览器版本不匹配,其他的可能代码问题,把webdriver配置到path里试试

     

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 微信小程序请求失败,网页能正常带锁访问
  • ¥15 对语音信号进行变调时,间接改变时序从而实现语音变速,进而将变调与变速同时实现、参数合成法换为波形合成法
  • ¥30 德飞莱51单片机实现C4炸弹
  • ¥50 CrossLink-LIF-MD6000 型 FPGA 的 CMOS 转 MIPI D-PHY IP 核功能使用异常
  • ¥15 proteus控制16x16LED点阵显示屏的设计
  • ¥30 求会做山景bp1048b2程序的。做直播声卡用
  • ¥15 求数学建模论文问题指导
  • ¥15 51单片机与数码管实现电子琴
  • ¥15 h3.6m 人类行为预测论文复现
  • ¥50 wordpress项目注册报失败刷新后其实是成功状态,请求排查原因