X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6853F3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1705782419; bh=iszOwMpwFdV1Zgff8+0cUNEFdWxpnaG4ejAp3zgdNj0=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ifAqzm6UNdm0iqN7A7e+cxksnodDyHcmpT9i+pdxKaTvKrWAekslEK4wjbG5oJrJc 03PMXK12vbtPzDRneUKhw9Rft+ExZuKfxE2/ubXe8VErS4zihbAi/1zxqMF8z1QyB2 LPyYYo9blmRA8P2uvqEwKAAiQu4mbTo6fV7tofbs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF6433858D3C ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CF6433858D3C ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705782398; cv=none; b=IIvuh6aIozGPyfCgcSD5+zPH7Ok1WolHP0gpjXWbRJ7z5twLB1iMLtW8497qBgy1ATv0TRlsIRJwqML11b+HBhboQi2kAMr5LtLEv561YJY3Zj2xmgLBhVrnfvNaY2kL4WIQPk3lEaXned5mCgVo6vpdzw0EwlarsGywdMAoqoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705782398; c=relaxed/simple; bh=Jk7woXpgTDkY3glm4ryEjE2x/4kZa4dvHSkHXf0AtCE=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=S10l5LiEZRaGuYMA0tqH9rIjwqkGtQ9nNgYNCoqD1OHCHp8+J6DzKvi6cPsWIS4ndJANh/owpJcpg122OevruyDcBEiONNFtscYw9lX8WhgCEgJsOC/B4DF1XhOFtMqjWktpv748gxAStXl1RPEmwfLvPtUElgG2H4FC3HFuVOw= ARC-Authentication-Results: i=1; server2.sourceware.org Date: Sat, 20 Jan 2024 20:26:11 +0000 To: "cygwin AT cygwin DOT com" Subject: Chromedriver does not launch from python 3.9 script Message-ID: Feedback-ID: 46170768:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, KAM_INFOUSMEBIZ, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.30 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: James via Cygwin Reply-To: James Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Latest version of Cygwin installed and updated. I'm trying to run this python script which uses chromium in order to execute. I got it all installed, and I'm just now trying to run the script and login, but it keeps saying it cannot find the chromedriver.exe. But the file exists and I know it's looking in the right place because I pasted the linux version in the same spot and renamed it to chromedriver.exe and it gave me an error about running a 16 bit program. I also dropped in the latest version from the google archive for chromedriver.exe and when I ran the script, it said the new version was not compatible with my current version, so I know for a fact it is reading the file. So why is it telling me it doesn't exist? But, this works: $ pip show selenium Name: selenium Version: 4.16.0 Summary: Home-page: https://www.selenium.dev Author: Author-email: License: Apache 2.0 Location: /home/User/Teachable-Dl/env/lib/python3.9/site-packages Requires: certifi, trio, trio-websocket, urllib3 Required-by: seleniumbase In any case, here is the error I get when I try to run the script: User AT User-PC ~/Teachable-Dl $ python3 main.py --url https://courseurl.com/courses/enrolled/869509 --man_login_url https://sso.teachable.com/secure/1096/identity/login/password --verbose Traceback (most recent call last): File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/seleniumbase/core/browser_launcher.py", line 2963, in get_local_driver if os.path.exists(LOCAL_CHROMEDRIVER): File "/usr/lib/python3.9/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/User/Teachable-Dl/main.py", line 789, in downloader = TeachableDownloader(verbose_arg=verbose, complete_lecture_arg=args.complete_lecture, File "/home/User/Teachable-Dl/main.py", line 52, in __init__ self.driver = Driver(uc=True, headed=True) File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/seleniumbase/plugins/driver_manager.py", line 488, in Driver driver = browser_launcher.get_driver( File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/seleniumbase/core/browser_launcher.py", line 1591, in get_driver return get_local_driver( File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/seleniumbase/core/browser_launcher.py", line 3839, in get_local_driver driver = webdriver.Chrome(service=service) File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__ super().__init__( File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 50, in __init__ self.service.start() File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 98, in start self._start_process(self._path) File "/home/User/Teachable-Dl/env/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 208, in _start_process self.process = subprocess.Popen( File "/usr/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\User\\.cache\\selenium\\chromedriver\\win64\\109.0.5414.74\\chromedriver.exe' (env) Now if I directly run that path: cygstart "C:\\Users\\User\\.cache\\selenium\\chromedriver\\win64\\109.0.5414.74\\chromedriver.exe" It runs same as clicking on it, so the file exists and the path is right. The popup window is a command window which starts with "Starting ChromeDriver 109...." and the last line is "ChromeDriver was started successfully" But the same file is saying doesn't exist when I try to run the script. I also pasted the chromedriver.exe file into /env/bin/ folder in the working directory, but it still says doesn't exist, yet now it says the file at the new correct path doesn't exist, so in other words it detected and found it at the new location but still is saying it didn't exist but it does. Also, if I delete the folder at that path and then run the script again, it still fails but it also creates the directory at that path and puts the chromedriver.exe in the directory - that means it literally put the file there itself but it's saying that it isn't found. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple