0

I wrote a Python script that has been working for over a year. Recently it stopped working since it doesn't find chromium at all, the terminal keeps showing this

/bin/sh: 1: google-chrome: not found
/bin/sh: 1: google-chrome-stable: not found
/bin/sh: 1: google-chrome-beta: not found
/bin/sh: 1: google-chrome-dev: not found

The latest version of the browser is installed in its usual path 'usr/bin/chromium-browser' and I also have the latest driver version, here's the part of the script that should open a Chrome window and goes to its designated URL:

import pandas as pd
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
driver_path = './chromedriver'
url = [URL]
loginid=input("id: ")
loginpass=input("password: ")
options = Options()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
driver.get(url)
driver.find_element(By.ID, "loginid").send_keys(loginid)
driver.find_element(By.ID, "loginpass").send_keys(loginpass)

what should I update?

Ray M
  • 72
  • 6
  • have you tried manually downloading it? – Jeril Aug 16 '23 at 08:51
  • Check this answer - https://stackoverflow.com/a/76752843/7598774 – Shawn Aug 16 '23 at 09:22
  • Does this answer your question? [Environment variables not found in python code](https://stackoverflow.com/questions/76906487/environment-variables-not-found-in-python-code) – Bibhav Aug 16 '23 at 09:58

1 Answers1

0
Sauron
  • 551
  • 2
  • 11