[Daily Post]는 매일매일 탐구한 내용을 간략하게 기록하는 포스트입니다.
따라서 정리되지 않은 내용과 추측을 포함하고 있을 수 있습니다.
더 체계적인 형식을 갖춘 글은 해당 카테고리의 포스트를 확인해주세요 :)

Daily Study

Traceback (most recent call last):
  File "/Users/snp/web/Selenium/school_list.py", line 13, in <module>
    driver = webdriver.Chrome(options=options)
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    super().__init__(
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 106, in __init__
    super().__init__(
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 288, in __init__
    self.start_session(capabilities, browser_profile)
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 381, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
    self.error_handler.check_response(response)
  File "/opt/homebrew/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 107
Current browser version is 109.0.5414.87 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  • 입학처 업무용 셀레니움 코드 작성이 필요해서 예전에 썼던 코드를 재실행했는데, 위와 같은 에러가 반환됐다.
  • 핵심 메세지는 다음과 같았다
    selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 107
    Current browser version is 109.0.5414.87 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
  • Chrome driver 107 버전만을 지원하는데 내 지정 경로의 드라이버는 109.x 버전이라 실행이 안되는 것 같았다.
  • 그래서 코드의 실행 경로에 있는 Chrome driver를 109.x 버전으로 바꿔줬다.

오늘의 시행착오