AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(python-run): prompt users to install Docker when execute_python_file encounters a Docker error (#2231)
Will Callender74aa4add1b06
diff --git a/autogpt/commands/execute_code.py b/autogpt/commands/execute_code.pyindex 95ba612264..11266f8527 100644--- a/autogpt/commands/execute_code.py+++ b/autogpt/commands/execute_code.py@@ -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)}"