diff --git a/app/scodoc/gen_tables.py b/app/scodoc/gen_tables.py
index 2ac3c3981..855545556 100644
--- a/app/scodoc/gen_tables.py
+++ b/app/scodoc/gen_tables.py
@@ -58,7 +58,7 @@ from app.scodoc import sco_utils as scu
from app.scodoc import sco_excel
from app.scodoc import sco_pdf
from app.scodoc import sco_xml
-from app.scodoc.sco_exceptions import ScoValueError
+from app.scodoc.sco_exceptions import ScoPDFFormatError
from app.scodoc.sco_pdf import SU
from app import log
@@ -551,7 +551,7 @@ class GenTable(object):
[Paragraph(SU(str(x)), CellStyle) for x in line] for line in data_list
]
except ValueError as exc:
- raise ScoValueError(f"Erreur dans un format pdf:
{str(exc)}") from exc
+ raise ScoPDFFormatError(str(exc)) from exc
pdf_style_list += self.pdf_table_style
T = Table(Pt, repeatRows=1, colWidths=self.pdf_col_widths, style=pdf_style_list)
diff --git a/app/scodoc/sco_exceptions.py b/app/scodoc/sco_exceptions.py
index c563c93e6..d975766ef 100644
--- a/app/scodoc/sco_exceptions.py
+++ b/app/scodoc/sco_exceptions.py
@@ -60,6 +60,21 @@ class ScoFormatError(ScoValueError):
pass
+class ScoPDFFormatError(ScoValueError):
+ "erreur génération PDF (templates platypus, ...)"
+
+ def __init__(self, msg, dest_url=None):
+ super().__init__(
+ f"""Erreur dans un format pdf:
+
{msg}
+Vérifiez les paramètres (polices de caractères, balisage) + dans les paramètres ou préférences. +
+ """, + dest_url=dest_url, + ) + + class ScoInvalidDept(ScoValueError): """departement invalide""" diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index 603627d14..df4c55e98 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -815,7 +815,7 @@ def tab_absences_html(groups_infos, etat=None): % (groups_infos.base_url, groups_infos.groups_titles), """