久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <legend id='L3Zqb'><style id='L3Zqb'><dir id='L3Zqb'><q id='L3Zqb'></q></dir></style></legend>

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

        <tfoot id='L3Zqb'></tfoot>
      1. <i id='L3Zqb'><tr id='L3Zqb'><dt id='L3Zqb'><q id='L3Zqb'><span id='L3Zqb'><b id='L3Zqb'><form id='L3Zqb'><ins id='L3Zqb'></ins><ul id='L3Zqb'></ul><sub id='L3Zqb'></sub></form><legend id='L3Zqb'></legend><bdo id='L3Zqb'><pre id='L3Zqb'><center id='L3Zqb'></center></pre></bdo></b><th id='L3Zqb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='L3Zqb'><tfoot id='L3Zqb'></tfoot><dl id='L3Zqb'><fieldset id='L3Zqb'></fieldset></dl></div>
          <bdo id='L3Zqb'></bdo><ul id='L3Zqb'></ul>
      2. selenium.common.exceptions.WebDriverException:消息:無法通過

        selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service error using ChromeDriver Chrome through Selenium Python(selenium.common.exceptions.WebDriverException:消息:無法通過 Selenium Python 使用 ChromeDri
          <bdo id='h2XBq'></bdo><ul id='h2XBq'></ul>

                <tfoot id='h2XBq'></tfoot>

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

              1. <i id='h2XBq'><tr id='h2XBq'><dt id='h2XBq'><q id='h2XBq'><span id='h2XBq'><b id='h2XBq'><form id='h2XBq'><ins id='h2XBq'></ins><ul id='h2XBq'></ul><sub id='h2XBq'></sub></form><legend id='h2XBq'></legend><bdo id='h2XBq'><pre id='h2XBq'><center id='h2XBq'></center></pre></bdo></b><th id='h2XBq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='h2XBq'><tfoot id='h2XBq'></tfoot><dl id='h2XBq'><fieldset id='h2XBq'></fieldset></dl></div>

                    <tbody id='h2XBq'></tbody>
                  <legend id='h2XBq'><style id='h2XBq'><dir id='h2XBq'><q id='h2XBq'></q></dir></style></legend>
                  本文介紹了selenium.common.exceptions.WebDriverException:消息:無法通過 Selenium Python 使用 ChromeDriver Chrome 連接到服務(wù)錯(cuò)誤的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  所以我在一臺(tái)計(jì)算機(jī)上使用 selenium 制作了一個(gè)程序并且可以正常工作,現(xiàn)在在另一臺(tái)計(jì)算機(jī)上使用它時(shí)出現(xiàn)此錯(cuò)誤:

                  So I have made a program on one computer using selenium and that worked, Now using it in another computer I get this error:

                  selenium.common.exceptions.WebDriverException:消息:無法連接到服務(wù) chromedriver

                  selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver

                  現(xiàn)在同樣的問題被提及:

                  Now this same issue was mention in:

                  Selenium python:不能連接到服務(wù) %s"% self.path

                  Selenium python:無法連接到服務(wù) %s"% self.path

                  Selenium 和 Python3 ChromeDriver 引發(fā)消息:無法連接到服務(wù) chromedriver

                  但是提到的解決方案不起作用.

                  however the solutions mentioned didnt work.

                  我正在使用 chrome 版本 79 并安裝了 chromedriver 79,我測(cè)試了在命令行中編寫 chromedriver,這意味著路徑配置正確,我確保 127.0.0.1 localhost 也在 etc/hosts 中

                  I am using chrome version 79 and have installed chromedriver 79, I tested writing chromedriver in command line and that works which means path is configured right, I have made sure 127.0.0.1 localhost is also in etc/hosts

                  下面是在我的電腦上運(yùn)行的代碼(所以我懷疑它是代碼的問題):

                  Below is my code which works on my computer (so i doubt its an issue with the code):

                  chrome_options = Options()   
                  chrome_options.add_argument("--headless")  
                  with webdriver.Chrome(chrome_options=chrome_options) as driver:
                      driver.set_window_size(800, 460) # takes two arguments, width and height of the browser and it has to be called before using get()
                      driver.execute_script("document.body.style.zoom='150%'")
                      driver.get("file:\"+url) # takes one argument, which is the url of the website you want to open
                      driver.find_element_by_tag_name('body').screenshot(output)  # avoids scrollbar
                  

                  上一個(gè)問題我也試過這個(gè)修改:

                  In the last question I also tried this modification:

                  chrome_options = Options()   
                  chrome_options.add_argument("--headless")  
                  with webdriver.Chrome("C:\chromedriver.exe",chrome_options=chrome_options) as driver:
                      driver.set_window_size(800, 460) # takes two arguments, width and height of the browser and it has to be called before using get()
                      driver.execute_script("document.body.style.zoom='150%'")
                      driver.get("file:\"+url) # takes one argument, which is the url of the website you want to open
                      driver.find_element_by_tag_name('body').screenshot(output)  # avoids scrollbar
                  

                  這反而會(huì)給我這個(gè)幾乎相同的錯(cuò)誤消息:

                  which would instead give me this almost identical error message:

                  selenium.common.exceptions.WebDriverException:消息:無法連接到服務(wù) C:chromedriver.exe

                  selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service C:chromedriver.exe

                  我不確定問題出在哪里.

                  I am unsure where the issue could lie.

                  順便說一句,我正在使用 Windows.

                  I am using windows by the way.

                  我嘗試過但沒有成功的方法:

                  1- 以管理員和正常方式運(yùn)行所有內(nèi)容

                  1- running everything as both admin and normal

                  2-重新安裝chrome

                  2- re-installing chrome

                  3- 使用 beta-chroma 80 和 webdriver 80

                  3- using the beta-chroma 80 and webdriver 80

                  4- 使用普通的 chrome 79 和 webdriver 79

                  4- using normal chrome 79 and webdriver 79

                  5- 將腳本和驅(qū)動(dòng)程序放在同一目錄中(使用正確的路徑)

                  5- Having both the script and the driver in the same directory (while using a correct path)

                  6- 擁有外部路徑并根據(jù)需要進(jìn)行設(shè)置

                  6- Having an external path and have it setup as needed

                  7- 在 PATH 文件夾中使用它.

                  7- Using it in the PATH folder.

                  8- 向 etc/hosts 添加127.0.0.1 localhost"

                  8- Adding "127.0.0.1 localhost" to etc/hosts

                  9- 運(yùn)行服務(wù)測(cè)試

                  我已確保在每次測(cè)試中一切都在正確的位置,我在每次新測(cè)試之前都進(jìn)行了重新啟動(dòng),他們總是給我同樣的錯(cuò)誤,如果我的路徑也不正確,也會(huì)發(fā)生這種情況,但是一旦我運(yùn)行了服務(wù)的代碼,它給了我一個(gè)不同的錯(cuò)誤,因?yàn)槲以?C:/中有我的 webdriver 需要管理員權(quán)限,但是使用正確的權(quán)限再次重新運(yùn)行測(cè)試會(huì)返回相同的錯(cuò)誤

                  I have ensured in every test that everything was in it's correct placement, I have ran a reboot before every new test, and they always give me the same error, which also happens to occur if I had an incorrect path as well, but once I ran the code for a service and it gave me a different error as I had my webdriver in C:/ which required admin privilages, however re-running the test again with the correct privilages gave back the same error

                  更新此問題并非 Chrome 驅(qū)動(dòng)程序獨(dú)有.即使遵循 Firefox 或邊緣驅(qū)動(dòng)程序的設(shè)置說明最終也會(huì)遇到相同的問題.這讓我懷疑連接正面臨一些問題.我已嘗試運(yùn)行 Mozilla 為設(shè)置提供的測(cè)試代碼,但沒有成功.

                  Update the issue isn't exclusive to the chrome driver. Even following setup instructions for either the Firefox or edge drivers end up on the same issues. It makes me suspect that the connection is facing some issue. I have tried running the test codes provided by Mozilla for the setup and it didn't work.

                  不確定這是否有很大幫助或根本沒有幫助.

                  Unsure if that does help much or at all.

                  推薦答案

                  這個(gè)錯(cuò)誤信息...

                  selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver
                  

                  ...暗示 ChromeDriver 無法啟動(dòng)/生成新的瀏覽上下文,即 Chrome 瀏覽器 會(huì)話.

                  ...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

                  你需要注意幾件事:

                  • 確保您已從 ChromeDriver 二進(jìn)制文件的確切格式79.0.3945.36/" rel="nofollow noreferrer">下載位置 與您的底層操作系統(tǒng)有關(guān):

                  • Ensure that you have downloaded the exact format of the ChromeDriver binary from the download location pertaining to your underlying OS among:

                  • chromedriver_linux64.zip:適用于 Linux 操作系統(tǒng)
                  • chromedriver_mac64.zip:適用于 Mac OSX
                  • chromedriver_win32.zip:適用于 Windows 操作系統(tǒng)
                  • chromedriver_linux64.zip: For Linux OS
                  • chromedriver_mac64.zip: For Mac OSX
                  • chromedriver_win32.zip: For Windows OS

                  確保 /etc/hosts 文件包含以下條目:

                  Ensure that /etc/hosts file contains the following entry:

                  127.0.0.1 localhost 
                  

                • 確保 ChromeDriver 二進(jìn)制文件對(duì) 非 root 用戶具有可執(zhí)行權(quán)限.

                • Ensure that ChromeDriver binary have executable permission for the non-root user.

                  確保您已通過參數(shù) executable_path 傳遞了正確的 ChromeDriver 二進(jìn)制文件的絕對(duì)路徑,如下所示:

                  Ensure that you have passed the proper absolute path of ChromeDriver binary through the argument executable_path as follows:

                  with webdriver.Chrome(executable_path=r'C:path	ochromedriver.exe', chrome_options=chrome_options) as driver:
                  

                • 所以你的有效代碼塊將是:

                • So your effective code block will be:

                  options = Options()   
                  options.add_argument("--headless")
                  options.add_argument('--no-sandbox') # Bypass OS security model
                  options.add_argument('--disable-gpu')  # applicable to windows os only
                  options.add_argument("--disable-dev-shm-usage")  # overcome limited resource problems
                  options.add_experimental_option("excludeSwitches", ["enable-automation"])
                  options.add_experimental_option('useAutomationExtension', False)
                  with webdriver.Chrome(executable_path=r'C:path	ochromedriver.exe', options=options) as driver:
                      driver.set_window_size(800, 460) # takes two arguments, width and height of the browser and it has to be called before 
                      driver.execute_script("document.body.style.zoom='150%'")
                      driver.get("file:\"+url) # takes one argument, which is the url of the website you want to open
                      driver.find_element_by_tag_name('body').screenshot(output)  # avoids scrollbar
                  

                • 最后,為避免您使用的二進(jìn)制文件版本之間出現(xiàn)不兼容,請(qǐng)確保:

                  Finally, to avoid incompatibility between the version of the binaries you are using ensure that:

                  • Selenium 已升級(jí)到當(dāng)前級(jí)別版本 3.141.59.
                  • ChromeDriver 已更新為當(dāng)前 ChromeDriver v79.0.3945.36 級(jí)別.
                  • Chrome 已更新至當(dāng)前 Chrome 版本 79.0 級(jí)別.(根據(jù) ChromeDriver v79.0 發(fā)行說明)
                  • 清理你的項(xiàng)目工作區(qū)通過你的IDE重建你的項(xiàng)目只需要依賴.
                  • 如果您的基本 Web 客戶端 版本太舊,請(qǐng)卸載它并安裝最新的 GA 和發(fā)布版本的 Web 客戶端.
                  • 進(jìn)行一次系統(tǒng)重啟.
                  • 非 root 用戶身份執(zhí)行您的 @Test.
                  • Selenium is upgraded to current levels Version 3.141.59.
                  • ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level.
                  • Chrome is updated to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes)
                  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
                  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
                  • Take a System Reboot.
                  • Execute your @Test as non-root user.

                  您可以在以下位置找到一些參考討論:

                  You can find a couple of reference discussions in:

                  • Python Selenium 無法連接到服務(wù) %s" % self.path in linux server
                  • selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver.exe while opening chrome browser
                  • 如何配置 ChromeDriver 以通過 Selenium 以 Headless 模式啟動(dòng) Chrome 瀏覽器?

                  這篇關(guān)于selenium.common.exceptions.WebDriverException:消息:無法通過 Selenium Python 使用 ChromeDriver Chrome 連接到服務(wù)錯(cuò)誤的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)
                • <i id='KCZlW'><tr id='KCZlW'><dt id='KCZlW'><q id='KCZlW'><span id='KCZlW'><b id='KCZlW'><form id='KCZlW'><ins id='KCZlW'></ins><ul id='KCZlW'></ul><sub id='KCZlW'></sub></form><legend id='KCZlW'></legend><bdo id='KCZlW'><pre id='KCZlW'><center id='KCZlW'></center></pre></bdo></b><th id='KCZlW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KCZlW'><tfoot id='KCZlW'></tfoot><dl id='KCZlW'><fieldset id='KCZlW'></fieldset></dl></div>
                  <legend id='KCZlW'><style id='KCZlW'><dir id='KCZlW'><q id='KCZlW'></q></dir></style></legend><tfoot id='KCZlW'></tfoot>

                      <tbody id='KCZlW'></tbody>

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

                        <bdo id='KCZlW'></bdo><ul id='KCZlW'></ul>

                            主站蜘蛛池模板: 91精品一区二区三区久久久久久 | 成人在线视频网 | 成人精品 | 久久这里只有精品首页 | 国产农村一级国产农村 | 国产精品久久久久久 | 国产一区不卡 | 免费不卡av| 99国产精品99久久久久久 | 亚洲精品一区二区三区在线 | 国产精品国色综合久久 | 一区二区欧美在线 | 在线成人 | 亚洲高清视频在线 | 中文在线a在线 | 精品国模一区二区三区欧美 | 日本成人二区 | 亚洲美女av网站 | 欧美精品一二三 | 伊人二区 | 亚洲一级毛片 | 视频一区二区在线观看 | 日日夜夜精品 | 国产成人一区二区三区电影 | 国产精品二区三区在线观看 | 精品国产精品国产偷麻豆 | 亚洲中字在线 | 久久精品一区 | 国产午夜精品一区二区三区嫩草 | 91免费在线视频 | 日韩精品一区二区三区中文字幕 | 午夜激情视频 | 欧美成年人视频在线观看 | 国产精品久久精品 | 成人h视频在线 | 超级黄色一级片 | 亚洲欧美高清 | 一级a性色生活片久久毛片 午夜精品在线观看 | 特级特黄特色的免费大片 | 99精品久久久久久久 | 色婷综合网 |