mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-21 16:04:21 +01:00
fix(python-run): prompt users to install Docker when execute_python_file encounters a Docker error (#2231)
fix(python-run): make error message more explicit --------- Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
@@ -84,6 +84,12 @@ def execute_python_file(file: str) -> str:
|
||||
|
||||
return logs
|
||||
|
||||
except docker.errors.DockerException as e:
|
||||
print(
|
||||
"Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/"
|
||||
)
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user