seleniumのエラー
解決したいこと
エラーを解消してseleniumを動かしたい
発生している問題・エラー
/Users/hoge/Library/Python/3.8/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Traceback (most recent call last):
File "/Users/hoge/Desktop/python/get-pip.py", line 9, in <module>
driver = webdriver.Chrome(service=Service(executable_path=driver_path))
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
super().__init__(
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/chromium/webdriver.py", line 66, in __init__
super().__init__(command_executor=executor, options=options)
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
self.start_session(capabilities)
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/Users/hoge/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: DevToolsActivePort file doesn't exist
Stacktrace:
0 chromedriver 0x0000000106a87ae8 chromedriver + 5217000
1 chromedriver 0x0000000106a7f723 chromedriver + 5183267
2 chromedriver 0x00000001065f1527 chromedriver + 406823
3 chromedriver 0x000000010662b699 chromedriver + 644761
4 chromedriver 0x0000000106627198 chromedriver + 627096
5 chromedriver 0x0000000106622a31 chromedriver + 608817
6 chromedriver 0x000000010666c1f3 chromedriver + 909811
7 chromedriver 0x000000010665f4a3 chromedriver + 857251
8 chromedriver 0x000000010662ffe3 chromedriver + 663523
9 chromedriver 0x000000010663092e chromedriver + 665902
10 chromedriver 0x0000000106a45a00 chromedriver + 4946432
11 chromedriver 0x0000000106a4bab4 chromedriver + 4971188
12 chromedriver 0x0000000106a264fe chromedriver + 4818174
13 chromedriver 0x0000000106a4c5c9 chromedriver + 4974025
14 chromedriver 0x0000000106a16784 chromedriver + 4753284
15 chromedriver 0x0000000106a6ec78 chromedriver + 5115000
16 chromedriver 0x0000000106a6ee37 chromedriver + 5115447
17 chromedriver 0x0000000106a7f343 chromedriver + 5182275
18 libsystem_pthread.dylib 0x00007fff6c853109 _pthread_start + 148
19 libsystem_pthread.dylib 0x00007fff6c84eb8b thread_start + 15```
該当するソースコード
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# 自動で最新バージョンをダウンロードしてパス名を返してくれる。
driver_path = ChromeDriverManager().install()
driver = webdriver.Chrome(service=Service(executable_path=driver_path))
wait = WebDriverWait(driver, 10)
# 全てのコンテンツが読み込まれるまで待機
wait.until(EC.presence_of_all_elements_located)
driver.get(f"https://www.google.com/")
# 全てのコンテンツが読み込まれるまで待機
wait.until(EC.presence_of_all_elements_located)
初心者な質問ですみません。
エラーを解消して、seleniumを動かしたいです。よろしくお願いします。