I have this code, and the error is very silly (I don't think the selenium have anything to do with it), but i've tried a lot of things and nothing works. What can I do? THE ERROR IS IN THE VARIABLES NAME "sHoras"
class Clima():
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
website = "https://weather.com/?Goto=Redirected"
path = "C:/Users/Administrador/Downloads/chromedriver_win32/chromedriver.exe"
driver = webdriver.Chrome(options=options, service=Service(path))
driver.get(website)
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, "truste-button3"))).click()
time.sleep(3)
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, 'LanguageSelector--LanguageSelectorStatus--mXkYQ'))).click()
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, '/html/body/div[1]/div[3]/div[1]/header/div/div[2]/div[2]/nav/div/div/section/div/ul/li[2]'))).click()
time.sleep(3)
button = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, 'LocationSearch_input')))
time.sleep(2)
button.click()
time.sleep(1)
button.send_keys("Medellin, Antioquia")
button.send_keys(Keys.RETURN)
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/nav/div/div[1]/a[2]/span'))).click()
time.sleep(2)
temperatura = driver.find_elements(By.XPATH, "//summary/div/div/div/span[@class='DetailsSummary--tempValue--1K4ka']")
temperatura = [temperatura.text for temperatura in temperatura]
horasT = driver.find_elements(By.XPATH, "//div/h3")
horasT = [horasT.text for horasT in horasT]
driver.quit()
indx = datetime.datetime.now()
indx = int(indx.strftime('%H'))
indx = (24 - indx)
sHoras = []
[sHoras.append(hora) for hora in horasT if hora not in sHoras]
horas = []
for i in range(0, indx):
horas.append(sHoras[i])
THE ERROR IS IN THE VARIABLES NAME "sHoras"