Open Rhenm091619 opened 1 year ago
C:\Users\Administrator\Desktop\Tinder>py tinder_bot.py Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Tinder\tinder_bot.py", line 103, in bot = TinderBot() File "C:\Users\Administrator\Desktop\Tinder\tinder_bot.py", line 9, in init self.driver = webdriver.Chrome() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in init super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in init self.service.start() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
I think the error is caused because you need to specify the path where your driver is. You can download different driver based on the browser.
You can do something like this: def init(self,driver_path): self.driver_path = 'path to driver'
C:\Users\Administrator\Desktop\Tinder>py tinder_bot.py Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Tinder\tinder_bot.py", line 103, in
bot = TinderBot()
File "C:\Users\Administrator\Desktop\Tinder\tinder_bot.py", line 9, in init
self.driver = webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in init
super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in init
self.service.start()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home