쥬피터는 되고, 코랩에서는 안되는 이유?
조회수 806회
-크롬 브라우저랑 크롬드라이버는 호환되는 상태입니다!
-selenium도 최신버전으로 업그레이드 했습니다!
from selenium import webdriver import time
driver = webdriver.Chrome()
driver.get("https://google.com")
time.sleep(5)
위의 코드를 실행하면,
SessionNotCreatedException Traceback (most recent call last) in () 2 import time 3 ----> 4 driver = webdriver.Chrome() 5 6 driver.get("https://google.com")
5 frames /usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 227 alert_text = value["alert"].get("text") 228 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 229 raise exception_class(message, screen, stacktrace)
SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /root/.cache/selenium/chrome/linux64/120.0.6099.109/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:
0 0x5bd01611ef83
1 0x5bd015dd7cf7
2 0x5bd015e0f60e
3 0x5bd015e0c26e
4 0x5bd015e5c80c
5 0x5bd015e50e53
6 0x5bd015e18dd4
7 0x5bd015e1a1de
8 0x5bd0160e3531
9 0x5bd0160e7455
10 0x5bd0160cff55
11 0x5bd0160e80ef
12 0x5bd0160b399f
13 0x5bd01610c008
14 0x5bd01610c1d7
15 0x5bd01611e124
16 0x78e8bfc57ac3
이런 오류가 뜹니다 ㅜ.ㅠ
jupyterlab에서는 잘 작동이 됩니다! 뭐가 문제일까요...???
1 답변
-
코랩은 브라우저에 표시만 되고, 실제론 다른 컴퓨터 (구글 클라우드)에서 돌아가기 때문에 그렇지 않을까 싶습니다. 그 쪽 가상 머신에 크롬/크롬 드라이버가 없어서 아닐까 싶습니다.
댓글 입력