Chrome在运行程序时无法打开

disho6za  于 10个月前  发布在  Go
关注(0)|答案(1)|浏览(124)

亲爱的
能帮我解决这个问题吗?我的浏览器在运行期间不再打开。非常感谢
我从昨天开始就得到了以下错误:

File "C:\Users\xxxxxxxx\PycharmProjects\pythonProject\AutoLog.py", line 15, in <module>
    driver = webdriver.Chrome(service=service, options=options)
 raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.179 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Stacktrace:
Backtrace:
    GetHandleVerifier [0x006DA813+48355]
    (No symbol) [0x0066C4B1]
    (No symbol) [0x00575358]
    (No symbol) [0x005961AC]
    (No symbol) [0x00591EF3]
    (No symbol) [0x00590579]
    (No symbol) [0x005C0C55]
    (No symbol) [0x005C093C]
    (No symbol) [0x005BA536]
    (No symbol) [0x005982DC]
    (No symbol) [0x005993DD]
    GetHandleVerifier [0x0093AABD+2539405]
    GetHandleVerifier [0x0097A78F+2800735]
    GetHandleVerifier [0x0097456C+2775612]
    GetHandleVerifier [0x007651E0+616112]
    (No symbol) [0x00675F8C]
    (No symbol) [0x00672328]
    (No symbol) [0x0067240B]
    (No symbol) [0x00664FF7]
    BaseThreadInitThunk [0x767E00C9+25]
    RtlGetAppContainerNamedObjectPath [0x77157B1E+286]
    RtlGetAppContainerNamedObjectPath [0x77157AEE+238]

Process finished with exit code 1

我的代码看起来像这样的开始:

import time
import pyautogui
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
from pynput.keyboard import Key, Controller
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
4nkexdtk

4nkexdtk1#

所以所有的代码行看起来都很好,但我认为错误在于你有一个更新版本的Chrome。根据错误,图书馆想要114的Chrome版本。您可以通过在Web浏览器上输入Chrome://settings/help来检查版本。如果它超过114,那么尝试在终端中写(py -m pip uninstall whatever library you used),然后(py -m pip install whatever library you used),不带括号,并使用您使用的库的名称,而不是逐个使用您使用的任何库。(我说的是Windows。我不知道Mac)。我们只是通过删除库并重新安装来更新它们。我希望这对你有帮助。。

相关问题