작성
·
246
답변 3
1
1
임포트시 오류가 난다면 해당 모듈의 설치가 정상적으로 완료되었는지 체크해보시면 좋겠습니다.
아니면 간단히 터미널에서
pip install 해당모듈이름
으로 재설치를 해보시기 바랍니다.
(참고로 오류메시지를 알려주시면 답변 드리는 데 큰 도움이 되겠습니다^^)
0
Microsoft Windows [Version 10.0.19045.3448]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user\data>C:/Users/user/AppData/Local/Programs/Python/Python311/python.exe c:/Users/user/data/sel.py
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path
path = SeleniumManager().driver_location(options) if path is None else path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 76, in driver_location
browser = options.capabilities["browserName"]
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'capabilities'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\user\data\sel.py", line 33, in <module>
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().__init__(
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in init
self.service.path = DriverFinder.get_path(self.service, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 40, in get_path
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
^^^^^^^^^^^^^^^^^^^^
같은 질문을 남겨주셔서
그곳에 답변 드리겠습니다 ^^