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 λ¨μμ μ¬μ©μ μ°¨λ¨ν΄μ μκΈ΄ μ€λ₯μ΄λ€.
μμ€ν
μ€μ β κ°μΈμ 보 λ³΄νΈ λ° λ³΄μ β νμΈ μμ΄ νμ© μ λλ¬μ€λ€.
μ
λ λμμ μν΄ ν¬λ‘¬λΈλΌμ°μ κ° μ μμ μΌλ‘ μ΄λ¦°λ€.