undetected-chromedriver
undetected-chromedriver copied to clipboard
uc have not auto download driver
Code:
options = ChromeOptions() options.add_argument("--disable-gpu") options.add_argument("--no-first-run") options.add_argument(f"--user-data-dir={user_dir}") driver = uc(options=options,browser_executable_path=user_dir.replace('Data\profile','GoogleChromePortable.exe'), suppress_welcome=False, user_multi_procs=True, version_main=102)
Error:
max() arg is an empty sequence Traceback (most recent call last): File "d:\ToolAirDropPython\task_etc\nansen\nansen_register.py", line 274, in executing driver = uc(options=options,browser_executable_path=user_dir.replace('Data\profile','GoogleChromePortable.exe'), suppress_welcome=False, user_multi_procs=True, version_main=BROWSER_VERSION)
File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\undetected_chromedriver_init_.py", line 258, in init self.patcher.auto() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\undetected_chromedriver\patcher.py", line 118, in auto most_recent = max(files, key=lambda f: f.stat().st_mtime) ValueError: max() arg is an empty sequence
when I'm using uc, I just driver=uc.Chrome(), one question is parameter 'browser_executable_path' is executable path of chromedriver or anything else?
when I'm using uc, I just driver=uc.Chrome(), one question is parameter 'browser_executable_path' is executable path of chromedriver or anything else?
I use path of chrome.exe, which open broswer
I get the same error on a raspberry pi, but it works fine on my windows machine.
Same. I'm getting this error only with user_multi_procs=True
and only in Windows Server machine
Works fine on Windows 10
I get the same error on a raspberry pi, but it works fine on my windows machine.
how do you get it to get past the execute error in rpi? are u using rpi4?
I get the same error on a raspberry pi, but it works fine on my windows machine.
how do you get it to get past the execute error in rpi? are u using rpi4?
I did use raspberry pi 4 but it shouldnt matter the execute error I assume is because the chromedriver binary doesnt have the correct permissions or is not the correct architechture (arm64 for raspberrypi) its a long time ago now so I dont remember exactly
Does anybody know how to fix this problem? When I use the driver locally (Linux) it works, but i get the same error when trying to run it inside Docker container (based on Debian 12)
This is what constructing webdriver looks like in my app: driver = uc.Chrome(driver_executable_path=config.PATH_TO_CHROMEDRIVER, options=chrome_options, seleniumwire_options=wire_options, no_sandbox=True, user_multi_procs=True, use_subprocess=False, version_main=config.UC_CHROMEDRIVER_VER)
UPDATE: I found out that I get the same error even on my local PC when I run the app as root (Docker also runs the app as root)