My webdriver-manager worked perfectly but when I made .exe file with pyinstaller I got error below. I find out that if I won't put --noconsole to pyinstaller command it will work but with --noconsole the program isn't working. Here is my code:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("https://www.google.com/")
driver.quit()
Here is how I created .exe file with pyinstaller:
pyinstaller --onefile --noconsole script.py
Here is the error which I got:
Traceback (most recent call last):
File "script.py", line 797, in program2
File "webdriver_manager\chrome.py", line 23, in __init__
File "webdriver_manager\driver.py", line 54, in __init__
File "webdriver_manager\utils.py", line 139, in chrome_version
File "os.py", line 983, in popen
File "subprocess.py", line 804, in __init__
File "subprocess.py", line 1142, in _get_handles
OSError: [WinError 6] The handle is invalid
Thanks for help!