<i id='dM9uV'><tr id='dM9uV'><dt id='dM9uV'><q id='dM9uV'><span id='dM9uV'><b id='dM9uV'><form id='dM9uV'><ins id='dM9uV'></ins><ul id='dM9uV'></ul><sub id='dM9uV'></sub></form><legend id='dM9uV'></legend><bdo id='dM9uV'><pre id='dM9uV'><center id='dM9uV'></center></pre></bdo></b><th id='dM9uV'></th></span></q></dt></tr></i><div id='dM9uV'><tfoot id='dM9uV'></tfoot><dl id='dM9uV'><fieldset id='dM9uV'></fieldset></dl></div>
  • <small id='dM9uV'></small><noframes id='dM9uV'>

  • <legend id='dM9uV'><style id='dM9uV'><dir id='dM9uV'><q id='dM9uV'></q></dir></style></legend>
      <bdo id='dM9uV'></bdo><ul id='dM9uV'></ul>

        <tfoot id='dM9uV'></tfoot>

        Selenium:WebDriverException:Chrome 无法启动:由于 google

        时间:2023-10-08
        <legend id='SGd6p'><style id='SGd6p'><dir id='SGd6p'><q id='SGd6p'></q></dir></style></legend>
          <tbody id='SGd6p'></tbody>

        <small id='SGd6p'></small><noframes id='SGd6p'>

            <bdo id='SGd6p'></bdo><ul id='SGd6p'></ul>
              <i id='SGd6p'><tr id='SGd6p'><dt id='SGd6p'><q id='SGd6p'><span id='SGd6p'><b id='SGd6p'><form id='SGd6p'><ins id='SGd6p'></ins><ul id='SGd6p'></ul><sub id='SGd6p'></sub></form><legend id='SGd6p'></legend><bdo id='SGd6p'><pre id='SGd6p'><center id='SGd6p'></center></pre></bdo></b><th id='SGd6p'></th></span></q></dt></tr></i><div id='SGd6p'><tfoot id='SGd6p'></tfoot><dl id='SGd6p'><fieldset id='SGd6p'></fieldset></dl></div>
                  <tfoot id='SGd6p'></tfoot>
                  本文介绍了Selenium:WebDriverException:Chrome 无法启动:由于 google-chrome 不再运行而崩溃,因此 ChromeDriver 假设 Chrome 已崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  最近我换了电脑,从那以后我就不能用 selenium 启动 chrome.我也尝试过 Firefox,但浏览器实例无法启动.

                  Recently I switched computers and since then I can't launch chrome with selenium. I've also tried Firefox but the browser instance just doesn't launch.

                  from selenium import webdriver
                  
                  d = webdriver.Chrome('/home/PycharmProjects/chromedriver')
                  
                  d.get('https://www.google.nl/')
                  

                  我收到以下错误:

                  selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
                    (unknown error: DevToolsActivePort file doesn't exist)
                    (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
                    (Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
                  

                  我安装了最新的 chrome 版本和 chromedriver

                  i have the latest chrome version and chromedriver installed

                  尝试@b0sss 解决方案后,我收到以下错误.

                  After trying @b0sss solution i am getting the following error.

                  selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
                    (chrome not reachable)
                    (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so chromedriver is assuming that Chrome has crashed.)
                    (Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-38-generic x86_64)
                  

                  推荐答案

                  尝试在这里下载并使用这个最新的 chrome 驱动程序版本.

                  Try to download HERE and use this latest chrome driver version.

                  https://sites.google.com/a/chromium.org/chromedriver/下载

                  试试这个:

                  from selenium import webdriver
                  from selenium.webdriver.chrome.options import Options
                  
                  chrome_options = Options()
                  chrome_options.add_argument('--headless')
                  chrome_options.add_argument('--no-sandbox')
                  chrome_options.add_argument('--disable-dev-shm-usage')
                  d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
                  d.get('https://www.google.nl/')
                  

                  这篇关于Selenium:WebDriverException:Chrome 无法启动:由于 google-chrome 不再运行而崩溃,因此 ChromeDriver 假设 Chrome 已崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 Windows 10 上使用 Nuitka 将 Python 3.6 脚本编译为独 下一篇:错误消息:“'chromedriver' 可执行文件需要在

                  相关文章

                  最新文章

                    <bdo id='ZASR0'></bdo><ul id='ZASR0'></ul>
                  <legend id='ZASR0'><style id='ZASR0'><dir id='ZASR0'><q id='ZASR0'></q></dir></style></legend>
                1. <small id='ZASR0'></small><noframes id='ZASR0'>

                2. <tfoot id='ZASR0'></tfoot>
                      <i id='ZASR0'><tr id='ZASR0'><dt id='ZASR0'><q id='ZASR0'><span id='ZASR0'><b id='ZASR0'><form id='ZASR0'><ins id='ZASR0'></ins><ul id='ZASR0'></ul><sub id='ZASR0'></sub></form><legend id='ZASR0'></legend><bdo id='ZASR0'><pre id='ZASR0'><center id='ZASR0'></center></pre></bdo></b><th id='ZASR0'></th></span></q></dt></tr></i><div id='ZASR0'><tfoot id='ZASR0'></tfoot><dl id='ZASR0'><fieldset id='ZASR0'></fieldset></dl></div>