0

Here is the issue, a few months ago I wrote a full FUNCTIONAL code on Python using Selenium with a Google Chrome driver. This code, it was a bot to do a manual process automatically. So far so good for the first 2 months.

The following information is important to understand the issue:

I have two computer where i run this code.

-The first one had Google Chrome version 83.xxx (THIS IS IMPORTANT)

-The second one had Google Chrome version 85.xxx (It updated itself, and i didn't noticed)

ISSUE:

The problem began when the code started not working on my 2nd computer

The problem was when it opened Google Chrome, it failed every time I ran it, it just didn't open Google Chrome and kept thinking.

So.... I did some troubleshooting ... BUT I did them on my FIRTS COMPUTER, not in the second one where i had the issue... As the code was the same and the Chrome version thought it was the same, I assumed that it would not have any problem (My bad).

Troubleshooting i made:

The code ran normally on my first computer, so i wasn't finding the real issue so in a try to fix it, i decided to uninstall from my FIRST computer, google chrome and installed again.

At the moment when I installed again Chrome in my FIRST computer, it updated by itself to version 85.xxxx, SO.... the issue from the SECOND computer appeared on my FIRST ONE. I just duplicated my issue for my both computers hehehe

SOMEHOW, I figured out that the REAL PROBLEM was on the version of my chromedriver.exe version. I downloaded for the version 83.xxx, So... with this in mind, I updated the .exe file and guess what...

THE PROBLEM DISAPPEARED!!!! BUT JUST FOR THE SECOND COMPUTER

Both computers/chromes are on version 85.xxx but the code just work on the second one.

I don't know if the action of uninstalled and installed chrome is the issue now. but i need you guys to recommend me a way to fix this.

Right now, I am doing some troubleshooting with this simple code:

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("URL")

This code works ONLY on my SECOND computer, and works pretty fine, It just open the URL that i wrote. But on the FIRST computer i have the following error...

selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create Chrome process.

I dont know what is this but I made some research, but so far I havent resolved. This is something that I read and tried but it didn't work:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-extensions')

#Choose the web software, need to have the drive in the same path as this file
driver = webdriver.Chrome(executable_path="my_path",options=chrome_options)
driver.get("URL")

HOPE YOU CAN HELP MY WITH THAT! THX

  • I'd check your Chrome directory(s). Do you have two versions of Chrome on that machine? Also check to be sure that paths to your browser and driver point to the correct version(s). (chromeDriver -v will give you version...) You can set paths to both chromedriver and chrome browser. (Defaults may not be pointing to the correct location if you chose a custom install directory.) – pcalkins Oct 06 '20 at 18:56
  • Which directory should be the right for Chrome? Also, How do i know if i have 2 version? – Jorge Rangel Oct 06 '20 at 19:43
  • There's no "right" directory, but there is a default path for programs in most OSes... Chromedriver will basically check there if you don't specify... so [default_program_dir]\Google\Chrome, etc... To specify a path use options.binary_location. https://stackoverflow.com/questions/45500606/set-chrome-browser-binary-through-chromedriver-in-python – pcalkins Oct 06 '20 at 20:04

0 Answers0