-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multithreading uc error #1997
Comments
I think the problem is somewhere with the profiles, I did it so that I created more profiles and made a special function for them to start and it worked |
thanks, I'll try that later |
It seems that it’s not possible because it uses the same location for the modified chromedriver. Perhaps you could patch it yourself and choose a custom location. I recommend using nodriver; it’s worth the transition. Multithreading is not possible in undetected_chromedriver. I use it with nodriver, running 2 to 3 drivers at the same time, each with its own daemon, and I haven’t had any problems. Each one takes care of its own core. https://github.com/ultrafunkamsterdam/nodriver/
And please, avoid touch this options:
|
I can't do multithreading, I constantly get errors when
`def main(thread):
if name == 'main':
mp.set_start_method('spawn', force=True)
`
error:
Traceback (most recent call last): File "C:\Users\vital\PycharmProjects\test4.py", line 485, in p.map(main, range(2)) File "C:\Users \vital\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\pool.py", line 367, in map return self._map_async(func, iterable, mapstar, chunksize).get() ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^File "C:\Users\vital\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\pool.py", line 774, in get raise self.value File "C:\Users\vital\AppData\Local\Programs \Python\Python312\Lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) ^^^^^^^^^^^^^^^^^ ^^^ File "C:\Users\vital\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\pool.py", line 48, in mapstar return list(map(*args)) ^^^^^ ^^^^^^^^^^^ File "C:\Users\vital\PycharmProjects\test4.py", line 94, in main driver = uc.Chrome(seleniumwire_options=seleniumwire_options, ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\vital\PycharmProjects\PycharmProjects\Lib \site-packages\seleniumwire\undetected_chromedriver\webdriver.py", line 61, in init super().init(*args, **kwargs) File "C:\Users\vital\PycharmProjects\PycharmProjects\Lib\site-packages\undetected_chromedriver_init.py", line 258, in init self.patcher.auto() File "C:\Users\vital\PycharmProjects\PycharmProjects\Lib\site-packages\undetected_chromedriver\patcher.py", line 138, in auto list(map(lambda f: f.unlink(), files)) File "C:\Users\vital\PycharmProjects\PycharmProjects\Lib\site-packages\undetected_chromedriver\patcher.py", line 138, in list(map(lambda f: f.unlink(), files)) ^^^^^^^^^^ File "C:\Users\vital\AppData\Local\Programs\Python\Python312\Lib\pathlib.py", line 1343, in unlink os.unlink(self) PermissionError: [WinError 5] Permission denied: 'C:\Users\vital\appdata\roaming\undetected_chromedriver\undetected\chromedriver-win32'
and when user_multi_procs=False only one instance of the browser is launched
The text was updated successfully, but these errors were encountered: