Проблема с запуском undetected_chromedriver на Linux(Gentoo)
Я новичок в разработке на Python. И сейчас я столкнулся со следующей проблемой при запуске undetected_chromedriver на Linux(Gentoo).
Я использую undetected_chromedriver версия 3.1.5r4, Python версия 3.8.5
Создана переменная окружения, которая хранит ссылку на исполняемый файл chromedriver для Linux:
export CHROMEDRIVER_PATH = '/path_to_chromedriver/node_modules/chromedriver/bin/chromedriver'
######################################################################## Код скрипта на Python
import undetected_chromedriver as UC_1
UC_1.TARGET_VERSION = 100
options = UC_1.ChromeOptions()
options.add_argument('--disable-gpu')
options.add_argument("--headless")
driver = UC_1.Chrome(driver_executable_path = os.environ.get('CHROMEDRIVER_PATH'), options = options, service_log_path = dir_name + '/chromedriver.log', use_subprocess = True)
########################################################################## При запуске указанного кода, возникает следующая ошибка(запуск скрипта производился с включенным logging.basicConfig(level=logging.DEBUG)):
INFO:undetected_chromedriver.patcher:patching driver executable /path_to_chromedriver/node_modules/chromedriver/bin/chromedriver
DEBUG:uc:created a temporary folder in which the user-data (profile) will be stored during this
session, and added it to chrome startup arguments: --user-data-dir=/tmp/tmp_fypdc2_
DEBUG:uc:did not find a bad exit_type flag
Error: Traceback (most recent call last):
File "ea_test.py", line 219, in <module>
driver = UC_1.Chrome(driver_executable_path = os.environ.get('CHROMEDRIVER_PATH'), options = options, service_log_path = dir_name + '/chromedriver.log', use_subprocess = True)
File "/path_to_env/.venv/lib/python3.8/site-packages/undetected_chromedriver/__init__.py", line 392, in __init__
browser = subprocess.Popen(
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1627, in _execute_child
executable = os.fsencode(executable)
File "/usr/lib/python-exec/python3.8/../../../lib/python3.8/os.py", line 806, in fsencode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
Подскажите, пожалуйста, где я ошибся? Как исправить данную ошибку?