fix(agent): Fix `execute_python_file` on local storage
It's still broken for remote/cloud storage.pull/7021/head
parent
180de0c9a9
commit
a7c7a5e18b
|
@ -164,8 +164,8 @@ class CodeExecutorComponent(CommandProvider):
|
|||
if not str(filename).endswith(".py"):
|
||||
raise InvalidArgumentError("Invalid file type. Only .py files are allowed.")
|
||||
|
||||
file_path = Path(filename)
|
||||
if not file_path.is_file():
|
||||
file_path = self.workspace.get_path(filename)
|
||||
if not self.workspace.exists(file_path):
|
||||
# Mimic the response that you get from the command line to make it
|
||||
# intuitively understandable for the LLM
|
||||
raise FileNotFoundError(
|
||||
|
|
Loading…
Reference in New Issue