본문 바로가기
Programming/Python

[Python] Selenium 버전 에러 해결 방법

by JeeU147 2023. 11. 3.
반응형

안녕하세요.

 

오늘은 Selenium 버전 에러 해결 방법에 대해 알아보려고 합니다.

 

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

options = Options()
driver = webdriver.Chrome(service=Service(executable_path=ChromeDriverManager().install()), options=options)

driver.get("https://www.naver.com")

 

driver = webdriver.Chrome(service=Service(executable_path=ChromeDriverManager().install()), options=options)

 

요런 문법으로 셀레니움을 사용하고 계셨다면 아래와 같은 에러가 발생할 수 있습니다.

 

1. 오류 메시지

ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/118.0.5993/chromedriver_win32.zip

 

2. 해결 방법

기존 webdriver-manager가 3버전이라서 나는 오류로써 4버전으로 업데이트를 해주면 에러가 해결됩니다.

# 해결 방법
pip install --upgrade webdriver-manager

 

감사합니다.

반응형

댓글