Search

[python, μ…€λ ˆλ‹ˆμ›€] Service chromedriver unexpectedly exited. Status code was: -9

νƒ€μž…
νŠΈλŸ¬λΈ”μŠˆνŒ…
νƒœκ·Έ
python
selenium
μƒνƒœ
Published
생성일
2022/12/08 15:08
μ΅œμ’… νŽΈμ§‘ μΌμ‹œ
2023/02/24 11:36
2 more properties

homebrew 둜 chromedriver μ„€μΉ˜

brew install chromedriver

μ—λŸ¬

μœ„μ²˜λŸΌ chromedriver λ₯Ό μ œλŒ€λ‘œ μ„€μΉ˜ν–ˆμ§€λ§Œ Status code was : -9 λΌλŠ” μ—λŸ¬μ½”λ“œκ°€ λœ¨λ©΄μ„œ 싀행이 μ•ˆ λœλ‹€.
--------------------------------------------------------------------------- WebDriverException Traceback (most recent call last) /Users/shawn/Documents/κ°œλ°œλ¬Έμ„œ/ν”„λ‘œμ νŠΈ/λ°€ν”½/1207.ipynb μ…€ 2 in <cell line: 3>() 1 from selenium import webdriver ----> 3 driver = webdriver.Chrome() File ~/opt/anaconda3/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:69, in WebDriver.__init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive) 66 if not service: 67 service = Service(executable_path, port, service_args, service_log_path) ---> 69 super().__init__(DesiredCapabilities.CHROME['browserName'], "goog", 70 port, options, 71 service_args, desired_capabilities, 72 service_log_path, service, keep_alive) File ~/opt/anaconda3/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py:89, in ChromiumDriver.__init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive) 86 raise AttributeError('service cannot be None') 88 self.service = service ---> 89 self.service.start() 91 try: 92 super().__init__( 93 command_executor=ChromiumRemoteConnection( 94 remote_server_addr=self.service.service_url, 95 browser_name=browser_name, vendor_prefix=vendor_prefix, 96 keep_alive=keep_alive, ignore_proxy=_ignore_proxy), 97 options=options) File ~/opt/anaconda3/lib/python3.9/site-packages/selenium/webdriver/common/service.py:98, in Service.start(self) 96 count = 0 97 while True: ---> 98 self.assert_process_still_running() 99 if self.is_connectable(): 100 break File ~/opt/anaconda3/lib/python3.9/site-packages/selenium/webdriver/common/service.py:110, in Service.assert_process_still_running(self) 108 return_code = self.process.poll() 109 if return_code: --> 110 raise WebDriverException( 111 'Service %s unexpectedly exited. Status code was: %s' 112 % (self.path, return_code) 113 ) WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: -9
Python
볡사

ν•΄κ²°

mac os λ‹¨μ—μ„œ μ‚¬μš©μ„ μ°¨λ‹¨ν•΄μ„œ 생긴 였λ₯˜μ΄λ‹€.
μ‹œμŠ€ν…œ μ„€μ • β†’ κ°œμΈμ •λ³΄ 보호 및 λ³΄μ•ˆ β†’ 확인 없이 ν—ˆμš© 을 λˆŒλŸ¬μ€€λ‹€.
μ…€λ ˆλ‹ˆμ›€μ— μ˜ν•΄ ν¬λ‘¬λΈŒλΌμš°μ €κ°€ μ •μƒμ μœΌλ‘œ μ—΄λ¦°λ‹€.