From 5d05053ce22ae948d6c26c7afbc3c1836c988687 Mon Sep 17 00:00:00 2001 From: Thierry RAMORASOAVINA Date: Sat, 26 Jul 2025 16:42:44 +0200 Subject: [PATCH] Fix the khiops version initialization independently of the OS It should always work despite noise (drivers logs, debug info) --- khiops/core/internals/runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/khiops/core/internals/runner.py b/khiops/core/internals/runner.py index 2e5f5098..3d0def05 100644 --- a/khiops/core/internals/runner.py +++ b/khiops/core/internals/runner.py @@ -949,8 +949,10 @@ def _initialize_khiops_version(self): # On success parse and save the version if return_code == 0: - # Skip potential non-version lines (ex: Completed loading of file driver...) - for line in stdout.split(os.linesep): + # Skip potential non-version lines + # (ex: Completed loading of file driver, debug info ...) + for line in stdout.split("\n"): + line = line.strip("\r") # remove Windows-specific Carriage-Return if line.startswith("Khiops"): khiops_version_str = line.rstrip().split(" ")[1] break