Skip to content

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 for 'requires string as left operand, not PosixPath'

Mike M712982a7d52a
diff --git a/autogpt/commands/execute_code.py b/autogpt/commands/execute_code.py
index db33490cc9..93f3532e85 100644
--- a/autogpt/commands/execute_code.py
+++ b/autogpt/commands/execute_code.py
@@ -100,7 +100,7 @@ def execute_shell(command_line: str) -> str:
"""
current_dir = os.getcwd()
- if WORKING_DIRECTORY not in current_dir: # Change dir into workspace if necessary
+ if str(WORKING_DIRECTORY) not in current_dir: # Change dir into workspace if necessary
work_dir = os.path.join(os.getcwd(), WORKING_DIRECTORY)
os.chdir(work_dir)