diff --git a/app/pe/pe_affichage.py b/app/pe/pe_affichage.py
index 4ed7c7d3df4a798a2c0fc8917f8db72d94117621..72762a8cf18950507dc32f8c3c18cf03d9a93c46 100644
--- a/app/pe/pe_affichage.py
+++ b/app/pe/pe_affichage.py
@@ -27,7 +27,7 @@ def pe_print(*a, **cles):
         msg = " ".join(a)
         print(msg)
     else:
-        lines = getattr(g, "scodoc_pe_log")
+        lines = getattr(g, "scodoc_pe_log", None)
         if lines is None:
             lines = pe_start_log()
         msg = " ".join(a)