Open colbyhill21 opened 2 years ago
Same issue here, undetected-chromedriver is spawning infinite processes
@voxvici I am hoping there is a solution for this, I would love to take advantage of the datadome improvements. I've tried digging into the source code although I'm in a bit over my head.
Please check the multiprocessing documentation for freeze_support()
here.
@colbyhill21 does freeze_support()
fix your issue ?
from multiprocessing import freeze_support
import undetected_chromedriver as uc
if __name__ == '__main__':
# Add support for when a program which uses multiprocessing has been frozen to produce a Windows executable.
# (Has been tested with py2exe, PyInstaller and cx_Freeze.)
freeze_support()
driver = uc.Chrome()
@colbyhill21 does
freeze_support()
fix your issue ?from multiprocessing import freeze_support import undetected_chromedriver as uc if __name__ == '__main__': # Add support for when a program which uses multiprocessing has been frozen to produce a Windows executable. # (Has been tested with py2exe, PyInstaller and cx_Freeze.) freeze_support() driver = uc.Chrome()
This Worked here. Thanks a lot friend. New problem now. #623 I go there now.. haha
First off, I wanted to say thank you for creating this, It has been excellent!
My issue: I am required to bundle UC with Pyinstaller to build it as a .EXE file. I recently have been trying to upgrade from 3.0.6 to take advantage of all of the new improvements, however, this has proven to be quite difficult for my use case due to freezing / crashing when built with pyinstaller. I've seen other issues related to this such as #501, #581 although no resolution has been provided there. I've tried using the workaround mentioned in #581 which is to use
freeze_support
before importing undetected-chromedriver.Simple code to reproduce:
Pyinstaller build command:
pyinstaller --noconfirm --onefile --console --add-data "C:/Users/testuser/AppData/Local/Programs/Python/Python310/Lib/site-packages/selenium;selenium/" "C:/Users/testuser/Documents/test/scratch.py"
undetected-chromedriver versions attempted to use:
The last working version is 3.0.6.
I'd greatly appreciate any help with this issue, and would be willing to pay.