RhinoBlindado / pradoscraper

Programa que te avisa si se ha actualizado alguna asignatura en PRADO.
0 stars 0 forks source link

Es necesario lanzarlo desde el directorio en el que está el programa #2

Open Cristinasj opened 3 years ago

Cristinasj commented 3 years ago

Por ejemplo, si lo lanzo desde mi home, me da el siguiente error

COURSES folder not found, making one. Traceback (most recent call last): File "Uni/pradoscraper/webPrado.py", line 221, in main() File "Uni/pradoscraper/webPrado.py", line 197, in main logInfo, courses = checkStatus() File "Uni/pradoscraper/webPrado.py", line 48, in checkStatus raise Exception("A courseList.txt file is needed.")

Y si se vuelve a lanzar como siempre, ya no funciona. Da el siguiente error:

Traceback (most recent call last): File "webPrado.py", line 221, in main() File "webPrado.py", line 206, in main courseRead(courses, driver) File "webPrado.py", line 109, in courseRead actualCourse = driver.find_element_by_xpath("//h4[contains(text(),'"+i+"')]") File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element 'value': value})['value'] File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //h4[contains(text(),'FUNDAMENTOS DE BASES DE DATOS - 2021 (COMÚN)')]

RhinoBlindado commented 3 years ago

Acknowleged