Selenium issues with Chrome.exe and Chromedriver.exe

I get this error
Chrome binary found at: C:\\Program Files\\Google\\Chrome\\Application\\chrome.exeExecute permission for C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe is granted. Failed to launch Chrome binary at C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe: /bin/sh: C:\Program Files\Google\Chrome\Application\chrome.exe: command not foundRead permission for C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe is granted.Write permission for C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe is granted.
for this code
import os
import subprocess
chrome_path = r"C:\Program Files\Google\Chrome\Application\chrome.exe"
Check if the Chrome binary exists at the specified pathif os.path.exists(chrome_path):
print(f"Chrome binary found at: {chrome_path}")
else:
print(f"Chrome binary not found at: {chrome_path}")
if os.access(chrome_path, os.X_OK):
print(f"Execute permission for {chrome_path} is granted.")
# Verify that the Chrome binary can be executed
try:
result = subprocess.run(f'"{chrome_path}"', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode == 0:
print(f"Chrome binary at {chrome_path} launched successfully.")
else:
print(f"Failed to launch Chrome binary at {chrome_path}: {result.stderr.decode()}")
except FileNotFoundError:
print(f"Chrome binary not found at {chrome_path}.")
except PermissionError:
print(f"Permission denied to execute Chrome binary at {chrome_path}.")
except Exception as e:
print(f"Failed to launch Chrome binary at {chrome_path}: {e}")
else:
print(f"Execute permission for {chrome_path} is denied.")
try:
with open(chrome_path, 'r'):
print(f"Read permission for {chrome_path} is granted.")
except PermissionError:
print(f"Read permission for {chrome_path} is denied.")
except Exception as e:
print(f"Error checking read permission for {chrome_path}: {e}")
try:
with open(chrome_path, 'a'):
print(f"Write permission for {chrome_path} is granted.")
except PermissionError:
print(f"Write permission for {chrome_path} is denied.")
except Exception as e:
print(f"Error checking write permission for {chrome_path}: {e}")
Operating system used: windows
Operating system used: windows
Operating system used: windows
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,248 Neuron
Please always use a code block (the </> icon) when pasting code. Dataiku DSS wasn't originally designed to natively run on Windows. It is available as an experimental version and only for testing. Dataiku does not provide official support for this installation.
From your execution log you can see that it tries to run "/bin/sh" which is a Linux shell command and doesn't find it as you are on Windows. So I will suggest you look at the other installations options in the link above to be in a fully supported platform if you want to use all available features.
-
So that does not help me at all.
If Dataiku was not meant to run on windows… then we should probably get a different system that is meant to run on windows.
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,248 Neuron
On the contrary I think it helps you a lot. As pointed out for the Other Installation Options section I referred you to there are ways of running Dataiku in Windows in a fully supported way (like using a VM). And in any case the requirement to run Dataiku on Linux applies to the DSS Server, not the users which just need a modern internet browser.
-
So i do not think that the windows issue applies. I am not using a local version of dataiku on my desktop… its a web based aws version of dataiku…..
-
Thank you for trying. But i need help with the errors that i was getting in my code not unrelated comments on windows desktop version of Dataiku .
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,248 Neuron
As you didn't explain properly your problem I assumed you were running DSS on Windows. If you are not then this piece of code is running in your machine and has nothing to do with Dataiku. Is that the case? If this is pure Python code running in your Windows machine?
-
yes, regardless of what anyone is using there are issues with running selenium and having chrome.exe and chromedriver.exe working. I am using dataiku and that was part of a much longer python script that keeps giving me errors. If you determine that is not a dataiku issue, then please stop responding. Thank you for your time