From d981ee5867a31d9467cf78920d2d56512c8ba802 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 10 Apr 2024 09:19:37 +0200 Subject: [PATCH] fix --- utilities/execution_engines/python_execution_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/execution_engines/python_execution_engine.py b/utilities/execution_engines/python_execution_engine.py index f1c54698..f7baedbe 100644 --- a/utilities/execution_engines/python_execution_engine.py +++ b/utilities/execution_engines/python_execution_engine.py @@ -55,7 +55,7 @@ def execute_python(code, client:Client, message_id): if process.returncode != 0: # The child process threw an exception. try: - error_message = f"Output:{output.decode('utf-8', errors="ignore")}\nError executing Python code:\n{error.decode('utf-8', errors="ignore")}" + error_message = f"Output:{output.decode('utf-8', errors='ignore')}\nError executing Python code:\n{error.decode('utf-8', errors="ignore")}" except: error_message = f"Error executing Python code:\n{error}" error_json = {"output": "
"+error_message+"
", "execution_time": execution_time}