msg erreur apo_compare_csv

This commit is contained in:
Emmanuel Viennet 2022-04-21 20:48:38 +02:00
parent 16f97b17be
commit ee8cfc6191
2 changed files with 10 additions and 4 deletions

View File

@ -272,9 +272,15 @@ def _build_etud_res(e, apo_data):
r = {} r = {}
for elt_code in apo_data.apo_elts: for elt_code in apo_data.apo_elts:
elt = apo_data.apo_elts[elt_code] elt = apo_data.apo_elts[elt_code]
try:
# les colonnes de cet élément
col_ids_type = [ col_ids_type = [
(ec["apoL_a01_code"], ec["Type R\xc3\xa9s."]) for ec in elt.cols (ec["apoL_a01_code"], ec["Type R\xc3\xa9s."]) for ec in elt.cols
] # les colonnes de cet élément ]
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] = {} r[elt_code] = {}
for (col_id, type_res) in col_ids_type: for (col_id, type_res) in col_ids_type:
r[elt_code][type_res] = e.cols[col_id] r[elt_code][type_res] = e.cols[col_id]

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.2.7" SCOVERSION = "9.2.8"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"