selenium manager не находит webdriver от chrome на версии selenium(4.16) (python)
при запуске строчки
driver = webdriver.chrome()
вылазит ряд ошибок
вот элементы кода: ''' from selenium import webdriver from selenium.webdriver.common.by import By import time import pyscreenshot import win32com.client import pyautogui
shell = win32com.client.Dispatch('WScript.Shell')
f = []
for _ in range(10):
b = input().split()
f.append(b[1])
for i in f:
driver = webdriver.Chrome()
driver.get(i)
# time.sleep(5)
login = driver.find_element(By.XPATH, '//[@id="quick_login"]/button[1]').click()
# time.sleep(5)
num = driver.find_element(By.ID, "index_email").send_keys(name)
time.sleep(3)
log = driver.find_element(By.XPATH, '//[@id="content"]/div[1]/form/button/span').click()
time.sleep(3)
''' вылазят следующие ошибки: ''' Traceback (most recent call last): File "C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 137, in run output = json.loads(stdout) ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\json_init_.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Александр\AppData\Roaming\Python\Python311\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\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 103, in driver_location
output = self.run(args)
^^^^^^^^^^^^^^
File "C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 140, in run
raise WebDriverException(f"Unsuccessful command executed: {command}") from err
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser chrome --output json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\aleksandr\PycharmProjects\pythonProject7\hui.py", line 18, in <module>
driver = webdriver.Chrome(service=service, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
super().__init__(
File "C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chromium\webdriver.py", line 49, in __init__
self.service.path = DriverFinder.get_path(self.service, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Александр\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path
raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
'''