国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

“Webdrivers”可執(zhí)行文件可能具有錯(cuò)誤的權(quán)限請(qǐng)參閱https://sites.google.com/a/chromium.org/chromedriver/home

瀏覽:129日期:2024-05-16 14:51:57
(adsbygoogle = window.adsbygoogle || []).push({}); 如何解決“Webdrivers”可執(zhí)行文件可能具有錯(cuò)誤的權(quán)限請(qǐng)參閱https://sites.google.com/a/chromium.org/chromedriver/home?

此錯(cuò)誤消息…

WebDriverException: Message: ’Webdrivers’ executable may have wrong permissions.

…表示您嘗試使用的 ChromeDriver 版本具有錯(cuò)誤的權(quán)限。

您似乎已經(jīng)嘗試過(guò):

driver = webdriver.Chrome(’C:Webdrivers’) # Optional argument, if not specified will search system $PATH variable.

幾句話:

如果您的基礎(chǔ)操作系統(tǒng)是windows:

您必須從ChromeDriver下載位置下載 并解壓縮以使用。此外,如果您明確指定 Chromedriver 二進(jìn)制路徑,則還必須附加二進(jìn)制擴(kuò)展名,即 chromedriver.exe 。在提及 Chromedriver 二進(jìn)制路徑時(shí),您必須使用單個(gè)正斜杠(即(/)原始(r)開(kāi)關(guān)),或者必須使用轉(zhuǎn)義的反斜杠(即)()。因此,您的有效代碼行將是:

driver = webdriver.Chrome(executable_path=r’C:/path/to/chromedriver.exe’)

如果您的基礎(chǔ)操作系統(tǒng)是linux:

您必須從ChromeDriver下載位置下載 ,然后解壓縮才能使用。此外,如果您明確指定 Chromedriver 二進(jìn)制路徑, 為可執(zhí)行二進(jìn)制文件提供任何擴(kuò)展名,即 chromedriver 。在提及 Chromedriver 二進(jìn)制路徑時(shí),您必須使用單個(gè)正斜杠,即(/)。因此,您的有效代碼行將是:

driver = webdriver.Chrome(executable_path=’/path/to/chromedriver’)

如果您的基礎(chǔ)操作系統(tǒng)是macos:

您必須從ChromeDriver下載位置下載 并解壓縮才能使用。此外,如果您明確指定 Chromedriver 二進(jìn)制路徑, 為可執(zhí)行二進(jìn)制文件提供任何擴(kuò)展名,即 chromedriver 。在提到chromedriver二進(jìn)制路徑時(shí),您必須使用單個(gè)正斜杠,即(/)。因此,您的有效代碼行將是:

driver = webdriver.Chrome(executable_path=’/path/to/chromedriver’)解決方法

我四處查看了兩個(gè)文檔,但沒(méi)有找到答案。

我一直在嘗試使用InstaPy一個(gè)用于python的instagramapi。在因多個(gè)錯(cuò)誤而失敗并假設(shè)InstaPy僅存在一些問(wèn)題之后,我嘗試使用selenium精對(duì)其進(jìn)行原始編碼。在插入示例代碼并將其更改為我喜歡的方式之后,我只是確保此代碼可以正常工作。我收到一個(gè)新錯(cuò)誤,而不是舊錯(cuò)誤,說(shuō)權(quán)限可能不正確。我嘗試重新安裝并以管理員身份運(yùn)行,但沒(méi)有任何效果。我該如何解決和/或這意味著什么

碼:

import timefrom selenium import webdriverdriver = 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()

錯(cuò)誤:

Traceback (most recent call last): File 'C:Program Files (x86)Python36-32libsite-packagesseleniumwebdrivercommonservice.py',line 74,in start stdout=self.log_file,stderr=self.log_file) File 'C:Program Files (x86)Python36-32libsubprocess.py',line 707,in __init__ restore_signals,start_new_session) File 'C:Program Files (x86)Python36-32libsubprocess.py',line 990,in _execute_child startupinfo)PermissionError: [WinError 5] Access is deniedDuring handling of the above exception,another exception occurred:Traceback (most recent call last): File 'C:WebdriversRawBot.py',line 5,in <module> driver = webdriver.Chrome(’C:Webdrivers’) # Optional argument,if not specified will search path. File 'C:Program Files (x86)Python36-32libsite-packagesseleniumwebdriverchromewebdriver.py',line 62,in __init__ self.service.start() File 'C:Program Files (x86)Python36-32libsite-packagesseleniumwebdrivercommonservice.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

標(biāo)簽: web
相關(guān)文章:
主站蜘蛛池模板: 无为县| 开原市| 扎赉特旗| 黄龙县| 邮箱| 休宁县| 四子王旗| 昆山市| 曲靖市| 固始县| 宕昌县| 景谷| 顺义区| 安岳县| 阿克| 衡东县| 汉中市| 五河县| 嘉定区| 乌兰浩特市| 宜宾市| 涡阳县| 甘洛县| SHOW| 安阳市| 延边| 克什克腾旗| 利津县| 宁南县| 吕梁市| 齐河县| 新乡县| 葫芦岛市| 漳浦县| 中超| 济阳县| 兴山县| 监利县| 溧阳市| 台东市| 江阴市|