diff --git a/app/scodoc/sco_apogee_csv.py b/app/scodoc/sco_apogee_csv.py index e6b40842be..d36d8e9c3c 100644 --- a/app/scodoc/sco_apogee_csv.py +++ b/app/scodoc/sco_apogee_csv.py @@ -92,6 +92,7 @@ import time from zipfile import ZipFile from flask import send_file +import numpy as np # Pour la détection auto de l'encodage des fichiers Apogée: from chardet import detect as chardet_detect @@ -134,6 +135,8 @@ def _apo_fmt_note(note, fmt="%3.2f"): val = float(note) except ValueError: return "" + if np.isnan(val): + return "" return (fmt % val).replace(".", APO_DECIMAL_SEP)