diff --git a/app/scodoc/sco_apogee_compare.py b/app/scodoc/sco_apogee_compare.py index 86e2f334be..b6cb042b2f 100644 --- a/app/scodoc/sco_apogee_compare.py +++ b/app/scodoc/sco_apogee_compare.py @@ -272,9 +272,15 @@ def _build_etud_res(e, apo_data): r = {} for elt_code in apo_data.apo_elts: elt = apo_data.apo_elts[elt_code] - col_ids_type = [ - (ec["apoL_a01_code"], ec["Type R\xc3\xa9s."]) for ec in elt.cols - ] # les colonnes de cet élément + try: + # les colonnes de cet élément + col_ids_type = [ + (ec["apoL_a01_code"], ec["Type R\xc3\xa9s."]) for ec in elt.cols + ] + except KeyError as exc: + raise ScoValueError( + "Erreur: un élément sans 'Type R\xc3\xa9s.'. Vérifiez l'encodage de vos fichiers." + ) from exc r[elt_code] = {} for (col_id, type_res) in col_ids_type: r[elt_code][type_res] = e.cols[col_id] diff --git a/sco_version.py b/sco_version.py index 24931a73be..06ddcfb8ee 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.2.7" +SCOVERSION = "9.2.8" SCONAME = "ScoDoc"