mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
fix2
This commit is contained in:
parent
d981ee5867
commit
20293c60c9
@ -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