mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 04:47:55 +00:00
updated
This commit is contained in:
parent
057ef9b05e
commit
73ab4559c3
@ -54,7 +54,10 @@ def execute_python(code, client:Client, message_id):
|
||||
# Check if the process was successful.
|
||||
if process.returncode != 0:
|
||||
# The child process threw an exception.
|
||||
try:
|
||||
error_message = f"Error executing Python code: {error.decode('utf8')}"
|
||||
except:
|
||||
error_message = f"Error executing Python code: {error}"
|
||||
error_json = {"output": "<div class='text-red-500'>"+error_message+"</div>", "execution_time": execution_time}
|
||||
return error_json
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user