mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
fix(agent): Fix execute_python_file on local storage
It's still broken for remote/cloud storage.
This commit is contained in:
@@ -164,8 +164,8 @@ class CodeExecutorComponent(CommandProvider):
|
|||||||
if not str(filename).endswith(".py"):
|
if not str(filename).endswith(".py"):
|
||||||
raise InvalidArgumentError("Invalid file type. Only .py files are allowed.")
|
raise InvalidArgumentError("Invalid file type. Only .py files are allowed.")
|
||||||
|
|
||||||
file_path = Path(filename)
|
file_path = self.workspace.get_path(filename)
|
||||||
if not file_path.is_file():
|
if not self.workspace.exists(file_path):
|
||||||
# Mimic the response that you get from the command line to make it
|
# Mimic the response that you get from the command line to make it
|
||||||
# intuitively understandable for the LLM
|
# intuitively understandable for the LLM
|
||||||
raise FileNotFoundError(
|
raise FileNotFoundError(
|
||||||
|
|||||||
Reference in New Issue
Block a user