Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug?: Attempted to access absolute path....in my own workspace #3705

Closed
1 task done
BaseInfinity opened this issue May 2, 2023 · 6 comments · Fixed by #3932
Closed
1 task done

Bug?: Attempted to access absolute path....in my own workspace #3705

BaseInfinity opened this issue May 2, 2023 · 6 comments · Fixed by #3932

Comments

@BaseInfinity
Copy link
Contributor

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

MacOS

Which version of Auto-GPT are you using?

Stable (branch)

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

This can be reproduced anytime AutoGPT tries to write to a file in my workspace using absolute path.

I want Auto-GPT to: Get the top 5 trending news articles about UFOs and Aliens

Current behavior 😯

I get an error:
Attempted to access absolute path '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace' in workspace '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace'.

Which im confused because even though it's an absolute path, it's a valid one in the workspace

I then tell it to use a relative path and it's fine (though it creates another workspace directory relative to it's own lol)

**Error:
  Attempted to access absolute path '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace' in workspace '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace'.**
NEXT ACTION:  COMMAND = list_files ARGUMENTS = {'directory': '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace/'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:use relative path to workspace then
SYSTEM:  Human feedback: use relative path to workspace then
 THOUGHTS:  I will use a relative path to the workspace directory to check the file path for the Node.js script.
REASONING:  Using a relative path to the workspace directory will allow me to check the file path for the Node.js script without having to specify the full file path.
PLAN:
-  Use a relative path to the workspace directory to check the file path for the Node.js script.
-  If the file path is incorrect, update it and try running the script again.
CRITICISM:  I should have used a relative path to the workspace directory from the beginning.
**NEXT ACTION:  COMMAND = list_files ARGUMENTS = {'directory': '/Users/stefanayala/Auto-GPT/autogpt/auto_gpt_workspace/auto_gpt_workspace'}**

Expected behavior 🤔

I expect it to not throw an error if the absolute path is attempting to access my workspace

Your prompt 📝

# Paste your prompt here

Your Logs 📒

<insert your logs here>
@GoZippy
Copy link

GoZippy commented May 3, 2023

Similar issue - windows 10 environment - not virtual env - not docker

After some thinking it started asking to list files in the working directory but defaulted for some reason to a linux mnt location and did not recognize it was on windows or the relative path to the working directory from wence it started...

restrict to working env is true for me

NEXT ACTION:  COMMAND = execute_shell ARGUMENTS = {'command_line': 'cd C:\\Users\\<username>\\Desktop\\auto-phones\\Auto-GPT\\autogpt\\auto_gpt_workspace && dir'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...

so... I told it to

SYSTEM:  Human feedback: adjust all future commands for windows 10 environment. You are working in a windows 10 OS environment not linux. If you need to spawn an agent to run exclusively in a linux environment ask me and then setup a docker container with whatever you need to complete your tasks assigned for that agent or agents.

this then seemed to take but then it started looking for the working directory on C: drive (my instance is on G: drive).

I then had to tell it the absolute path to the working directory - and not it is reading files in that directory and writing to them just fine... sorta... it gives that Errir attempted to access absolute path - but it still works... not sure why

 Asking user via keyboard...
Input:adjust all future commands for windows 10 environment. You are working in a windows 10 OS environment not linux. If you need to spawn an agent to run exclusively in a linux environment ask me and then setup a docker container with whatever you need to complete your tasks assigned for that agent or agents.
SYSTEM:  Human feedback: adjust all future commands for windows 10 environment. You are working in a windows 10 OS environment not linux. If you need to spawn an agent to run exclusively in a linux environment ask me and then setup a docker container with whatever you need to complete your tasks assigned for that agent or agents.
 THOUGHTS:  Let's use the 'execute_shell' command to navigate to the correct directory and check if the lead_generation.py file exists.
REASONING:  Navigating to the correct directory using the 'execute_shell' command will allow us to check if the lead_generation.py file exists and ensure that we are referencing the correct file path.
PLAN:
-  Use the 'execute_shell' command to navigate to the correct directory and check if the lead_generation.py file exists.
CRITICISM:  We need to ensure that we are referencing the correct directory and that the file path is accurate.
NEXT ACTION:  COMMAND = execute_shell ARGUMENTS = {'command_line': 'cd C:\\Users\\<username>\\Desktop\\auto-phones\\Auto-GPT\\autogpt\\auto_gpt_workspace && dir'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
  Executing command 'cd C:\Users\<username>\Desktop\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace && dir' in working directory 'G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace'
SYSTEM:  Command execute_shell returned: STDOUT: b'' STDERR: b'The system cannot find the file specified.\r\n'
 THOUGHTS:  Let's use the 'execute_shell' command to navigate to the correct directory and check if the lead_generation.py file exists.
REASONING:  Navigating to the correct directory using the 'execute_shell' command will allow us to check if the lead_generation.py file exists and ensure that we are referencing the correct file path.
PLAN:
-  Use the 'execute_shell' command to navigate to the correct directory and check if the lead_generation.py file exists.
CRITICISM:  We need to ensure that we are referencing the correct directory and that the file path is accurate.
NEXT ACTION:  COMMAND = execute_shell ARGUMENTS = {'command_line': 'cd C:\\Users\\<username>\\Desktop\\auto-phones\\Auto-GPT\\autogpt\\auto_gpt_workspace && dir'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:**set and remember that your working directory on this machine is located at G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace**
SYSTEM:  Human feedback: set and remember that your working directory on this machine is located at G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace
 THOUGHTS:  Let's use the 'list_files' command to check if the lead_generation.py file exists in the current directory.
REASONING:  Using the 'list_files' command will allow us to see all the files in the current directory and check if the lead_generation.py file exists.
PLAN:
-  Use the 'list_files' command to check if the lead_generation.py file exists in the current directory.
CRITICISM:  We need to ensure that we are referencing the correct directory and that the file path is accurate.
Error:
  Attempted to access absolute path 'G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace' in workspace 'G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace'.
NEXT ACTION:  COMMAND = list_files ARGUMENTS = {'directory': 'G:\\auto-phones\\Auto-GPT\\autogpt\\auto_gpt_workspace'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
SYSTEM:  Command list_files returned: ['auto-gpt.json', 'customer_research.txt', 'file_logger.txt', 'gpt_agents.txt', 'install_requests.py', 'lead_generation.txt', 'marketing_optimization.txt', 'marketing_plan.txt', 'phone_services_research.py', 'quote_generation.txt', 'third_party_providers.txt', 'third_party_services.txt', 'uc_research.txt']
 THOUGHTS:  Let's use the 'read_file' command to read the contents of the lead_generation.py file.
REASONING:  Using the 'read_file' command will allow us to read the contents of the lead_generation.py file and ensure that it contains the necessary code for lead generation.
PLAN:
-  Use the 'read_file' command to read the contents of the lead_generation.py file.
CRITICISM:  We need to ensure that the file path is accurate and that the lead_generation.py file contains the necessary code for lead generation.
**Error:
  Attempted to access absolute path 'G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace\lead_generation.txt' in workspace 'G:\auto-phones\Auto-GPT\autogpt\auto_gpt_workspace'.**
NEXT ACTION:  COMMAND = read_file ARGUMENTS = {'filename': 'G:\\auto-phones\\Auto-GPT\\autogpt\\auto_gpt_workspace\\lead_generation.txt'}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y

idk - but it is working now... will test more later

@BaseInfinity
Copy link
Contributor Author

BaseInfinity commented May 3, 2023

@GoZippy Check out https://github.com/hdkiller/Auto-GPT-SystemInfo it will make sure to use system commands for your OS

@GoZippy
Copy link

GoZippy commented May 3, 2023

@GoZippy Check out https://github.com/hdkiller/Auto-GPT-SystemInfo it will make sure to use system commands for your OS

Yes. This needs to be included in master... nice work/ find

@BaseInfinity
Copy link
Contributor Author

@GoZippy i agree, a lot of people's frustrations beyond getting this installed is running into invalid system commands and thinking it's borked lol

@Tyller7
Copy link

Tyller7 commented May 5, 2023

Same problem with windows 11, I have the same error and Autogpt works at 20% with this problem that I don't understand. nothing works. I decided to wait for updates. everything goes very fast :))

@BaseInfinity
Copy link
Contributor Author

Here's my fix:
#3932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants