diff --git a/notes_tools/extract.py b/notes_tools/extract.py index 9c08100..ada18ec 100644 --- a/notes_tools/extract.py +++ b/notes_tools/extract.py @@ -8,6 +8,7 @@ from path import Path notes_path = Path("./") + notStudent = ["Trimestre", "Nom", "Date", "Exercice", "Question", "Competence", "Domaine", "Commentaire", "Bareme", "Niveau"] pure_marks = ["Malus", "Bonus", "Presentation"] @@ -33,10 +34,11 @@ def get_class_ws(classe, path = notes_path): """ From the name of a classe, returns pd.ExcelFile """ - if classe in list_classes(path): - return pd.ExcelFile(notes_path/classe+".xlsx") + p = Path(path) + if classe in list_classes(p): + return pd.ExcelFile(p/classe+".xlsx") else: - raise ValueError("This class is not disponible in {p}. You have to choose in {c}".format(p = path, c = list_classes(path))) + raise ValueError("This class is not disponible in {p}. You have to choose in {c}".format(p = p, c = list_classes(p))) def extract_students(df, notStudent = notStudent): """ Extract the list of students from df """