From b7069351ae138d6b6ab07b35c54269b9dd129493 Mon Sep 17 00:00:00 2001 From: Vlad <53900049+VladKlimen@users.noreply.github.com> Date: Fri, 19 Jul 2024 01:30:14 +0300 Subject: [PATCH] Update pddl_planner.py - added errors='ignore' in byte string decode in solve_ I tried to run some solver and the only problem was the exception that was thrown because of encoding failure of out_err_bytes, that anyway goes to logs and not critical to lack some non-unicode characters --- unified_planning/engines/pddl_planner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified_planning/engines/pddl_planner.py b/unified_planning/engines/pddl_planner.py index 6f8ae2ec1..af1d9adfd 100644 --- a/unified_planning/engines/pddl_planner.py +++ b/unified_planning/engines/pddl_planner.py @@ -183,7 +183,7 @@ def _solve( proc_err: List[str] = [] try: out_err_bytes = process.communicate(timeout=timeout) - proc_out, proc_err = [[x.decode()] for x in out_err_bytes] + proc_out, proc_err = [[x.decode(errors='ignore')] for x in out_err_bytes] except subprocess.TimeoutExpired: timeout_occurred = True retval = process.returncode