mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 10:46:27 +00:00
fix
This commit is contained in:
parent
b9a93a2d1b
commit
d981ee5867
@ -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": "<div class='text-red-500'>"+error_message+"</div>", "execution_time": execution_time}
|
||||
|
Loading…
Reference in New Issue
Block a user