Closed vikasatquoality closed 9 months ago
Same issue but on Windows. I asked Auto-Gpt to generate an Angular application:
Initial Prompt:
Create an Angular application in the folder c:\\source\\repos\\generated\\20230502_UITest001 with a collapsible left navigation panel and scss styling.', 'Implement a configurable set of modules ("Compliance", "Regulatory", and "Overwatch") that appear in the left navigation panel and are controlled by feature flags at a customer level.', 'Ensure that access to the modules is restricted based on the corresponding feature flag at the customer level. If the user or customer does not have the correct feature flag turned on, the corresponding module should not be displayed in the left navigation panel.', 'Implement a rerouting mechanism to redirect users who attempt to directly enter a route for a module they do not have access to an access denied route.', 'Ensure that the generated Angular application meets the specified requirements and is ready for deployment.
Result:
NEXT ACTION: COMMAND = execute_python_file ARGUMENTS = {'filename': 'C:\\source\\repos\\Auto-GPT\\autogpt\\auto_gpt_workspace\\create_angular_app.py'}
Executing file 'C:\source\repos\Auto-GPT\autogpt\auto_gpt_workspace\create_angular_app.py'
Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/
SYSTEM: Command execute_python_file returned: Error: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
THOUGHTS: It seems that the file 'create_angular_app.py' is missing. I will create the file and write the necessary code to it. I will use the 'write_to_file' command to write the code to the file.
REASONING: Creating the file and writing the code to it will allow me to execute the necessary commands to create the Angular application.
PLAN:
- Create 'create_angular_app.py' file
- Write necessary code to file using 'write_to_file' command
CRITICISM: I need to ensure that I am writing the correct code to the file and that there are no errors in the code. I should also verify that the file was created and that the code was written to it successfully.
NEXT ACTION: COMMAND = write_to_file ARGUMENTS = {'filename': 'C:\\source\\repos\\Auto-GPT\\autogpt\\auto_gpt_workspace\\create_angular_app.py', 'text': "import os\n\nos.system('ng new c:/source/repos/generated/20230502_UITest001 --skip-install=true --routing=false --style=scss')"}
SYSTEM: Command write_to_file returned: Error: File has already been updated.
THOUGHTS: It seems that the file 'create_angular_app.py' already exists and has been updated. I will now execute the file using the 'execute_python_file' command to create the Angular application.
REASONING: Executing the file will allow me to create the Angular application using the necessary commands.
PLAN:
- Execute 'create_angular_app.py' file using 'execute_python_file' command
CRITICISM: I need to ensure that the Angular application was created successfully and that all necessary files and folders are present. I should also verify that the application is running correctly.
NEXT ACTION: COMMAND = execute_python_file ARGUMENTS = {'filename': 'C:\\source\\repos\\Auto-GPT\\autogpt\\auto_gpt_workspace\\create_angular_app.py'}
Executing file 'C:\source\repos\Auto-GPT\autogpt\auto_gpt_workspace\create_angular_app.py'
Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/
I have Docker Desktop installed and I'm running locally with run.bat so doesn't seem like a reasonable response.
I am also running locally on windows with run.bat and my docker version is
docker --version Docker version 23.0.5, build bc4487a python --version Python 3.11.2
Works for me. Can you please execute docker run hello-world
and see if it returns:
Good lord. Thanks for the pointer @k-boikov . Clean Windows install and in the middle of restarts for other things I hadn't noticed that Docker Desktop needed a wsl update to get the engine going. Did that, docker was then running correctly and Auto-GPT was able to get past that issue.
That combined with setting EXECUTE_LOCAL_COMMANDS=True in .env got me moving. Still some wonkiness in the overall process (not directly Auto-GPT related I don't believe - more likely some details on windows paths in the prompt to iron out).
Thanks!
@k-boikov
C:\Users\Derek>docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 719385e32844: Pull complete Digest: sha256:a018c0741483753da06f5994ee4b5fcdbbdb8c23ab9e8543009689745c175fd8 Status: Downloaded newer image for hello-world:latest
Hello from Docker! This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/
For more examples and ideas, visit: https://docs.docker.com/get-started/
Now as a note, my specific issue may be fixed already in 3.0.1 due to particular code being merged in, so I'm waiting for that version to get merged into stable
I am also running locally on windows with run.bat and my docker version is docker --version Docker version 23.0.5, build bc4487a python --version Python 3.11.2
This is the sort of info that we would ideally capture/show during startup or at the very least by providing a dedicated command so that folks can provide more actionable bug reports
is it possible that this is related to the issue that this PR tries to resolve? #3875
for auto-gpt running inside docker to have this sort of version info about docker itself, I suppose the docker-compose/Dockerfile stuff would need changing to pass its own version numbers into the container, so that autogpt actually knows that it's being containerized
I'm getting the same error -- I've been trying using autogpt to make a list of concert dates and prices, just to test it out. It can't seem to be able to write a file and it tries to execute a .py file which doesn't exist.. It does this in loop forever..
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
Executing file '/Applications/Auto-GPT/autogpt/auto_gpt_workspace/web_scraping.py'
SYSTEM: Command execute_python_file returned: Error: File '/Applications/Auto-GPT/autogpt/auto_gpt_workspace/web_scraping.py' does not exist.
THOUGHTS: We can use web scraping techniques to gather more information on each concert, such as the venue capacity and ticket prices.
REASONING: Having more information on each concert will allow us to provide a more accurate rating for each concert, indicating which ones are most likely to be the best experience.
PLAN:
- Use web scraping techniques to gather more information on each concert, such as the venue capacity and ticket prices
- Analyze data on artist popularity, venue capacity, and other factors to provide a rating for each concert, indicating which ones are most likely to be the best experience
- Use natural language processing to understand user preferences and provide personalized recommendations based on location, budget, and other factors
- Provide alerts when tickets become available for highly recommended concerts
CRITICISM: I need to make sure we are not violating any laws or regulations when web scraping information on each concert.
NEXT ACTION: COMMAND = execute_python_file ARGUMENTS = {'filename': '/Applications/Auto-GPT/autogpt/auto_gpt_workspace/web_scraping.py'}
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 file '/Applications/Auto-GPT/autogpt/auto_gpt_workspace/web_scraping.py'
SYSTEM: Command execute_python_file returned: Error: File '/Applications/Auto-GPT/autogpt/auto_gpt_workspace/web_scraping.py' does not exist.
I have been struggling with getting it to recognize a csv file inside a python script. It can read the csv from the auto_gpt_workspace. but when I have it execute a python script with a pandas read_csv(filename) it says the file isnt there. the path is correct, obviously it just read the file.
I have been struggling with getting it to recognize a csv file inside a python script. It can read the csv from the auto_gpt_workspace. but when I have it execute a python script with a pandas read_csv(filename) it says the file isnt there. the path is correct, obviously it just read the file.
Same problem. How did you resolve? Any inputs will be very helpful.
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.
This issue was closed automatically because it has been stale for 10 days with no activity.
β οΈ Search for existing issues first β οΈ
Which Operating System are you using?
MacOS
Which version of Auto-GPT are you using?
Latest Release
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce πΉ
Give the prompt to write and code and test it.
Current behavior π―
It creates the file under autogpt folder. But while executing it throws below error
Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/
Due to this te agent gets into infinite loop
Expected behavior π€
It should be able to run the script(program file) so that it can check the response and improve itself
Your prompt π
Your Logs π