I am trying to code basic python-Google Chrome interactions with webdriver but I constantly get the same error while trying to launch a link on my browser.
Here is my code:
from selenium import webdriver import os class Instagrambot: def __init__(self, username, password): self.username = username self.password = password self.driver = webdriver.Chrome('./chromedriver.exe') if __name__ == '__main__': ig_bot = Instagrambot('temp_username', 'temp_password') I have the chromedriver in the current directory, and I am using the correct version of the chromedriver (79.0.3945.36) for my browser (Chrome 79.0.3945.88) . The full error I am getting is:
Traceback (most recent call last): File "c:/Users/Arthur/Documents/instabot/bot.py", line 16, in <module> ig_bot = Instagrambot('temp_username', 'temp_password') File "c:/Users/Arthur/Documents/instabot/bot.py", line 12, in __init__ self.driver = webdriver.Chrome('./chromedriver.exe') File "C:\Users\Arthur\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__desired_capabilities=desired_capabilities) File "C:\Users\Arthur\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__self.start_session(capabilities, browser_profile) File "C:\Users\Arthur\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Users\Arthur\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\Arthur\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create a Chrome process. I have already tried:
Writing the full executable path towards chromedriver.exe (same folder of bot.py)
Overriding the Chrome binary location as suggested in this answer: https://stackoverflow.com/a/53078276/11206079
If anyone can help me or give any insight about how to fix it I would be really glad!