AutoGPT: Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.

Duplicates

  • I have searched the existing issues

Steps to reproduce šŸ•¹

Warning: The file ā€˜auto-gpt.json’ does not exist. Local memory would not be saved to a file. image

Current behavior 😯

image

Expected behavior šŸ¤”

No response

Your prompt šŸ“

# Paste your prompt here

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 68 (2 by maintainers)

Most upvoted comments

If you are having this issue with docker compose:

From the main project directory run touch auto-gpt.json to create the empty file.

Then open Dockerfile and add the following line which will copy the file into the docker container during build:

COPY --chown=appuser:appuser auto-gpt.json .

Then build:

docker-compose build auto-gpt

Can some one please confirm if paying the open AI API solved this issue?

Well, I setup my billing and still getting the same message, the .env is an env file type, not a text or template as my Mac was taking it, and the API key is there so not sure what else to try. anyone got this working on mac?

I have finally got it, in my case, the issue was that the Mac file extension was for some reason taking the .env as an Adobe Illustrator file type, I removed that file type from the file info and then it worked.

Found this on a website (https://prinspeter.medium.com/how-to-use-autogpt-using-docker-a-step-by-step-guide-34ad33957de9) and once updated it worked. Screenshot 2023-04-29 110353

That addressed the issue of the LocalStorage Database not present and effectively keeps the data saved outside the container. Additionally I’ve updated the volumes to look like this:

    volumes:
      - "./autogpt:/home/appuser/autogpt"
      - ".env:/app/.env"
      - "./auto-gpt.json:/home/appuser/auto-gpt.json"

This is because docker-compose is mounting the app in the root /app but the app seems to being run from a stale copy from /home/appuser/autogpt which I don’t understand why. But for most of the cases just mounting the json file is enough.

I solved API issue by copying in cmd(windows)

set OPENAI_API_KEY=your_api_key_here

worked fine after

Just open the AutoGPT file in VScode and create a new file called ā€œauto-gpt.jsonā€ and save it to the main folder

If you are having this issue with docker compose:

From the main project directory run touch auto-gpt.json to create the empty file.

Then open Dockerfile and add the following line which will copy the file into the docker container during build:

COPY --chown=appuser:appuser auto-gpt.json .

Then build:

docker-compose build auto-gpt

It works, thank you. But do I have to use docker cp command to copy it out of the container before I cut it off. @gavinuhma

č°čƒ½ę•™ę•™č€å­

I’ve created an empty ā€œauto-gpt.jsonā€ file in project root, but still getting ā€œWarning: The file ā€˜auto-gpt.json’ does not exist.ā€:

$ ls -l auto-gpt.json 
-rw-r--r-- 1 chatgpt chatgpt 0 Apr 27 08:57 auto-gpt.json

$ docker-compose run --rm auto-gpt
Creating auto-gpt_auto-gpt_run ... done
Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.
(...)

Edit: missed this comment - https://github.com/Significant-Gravitas/Auto-GPT/issues/1410#issuecomment-1522751914 - which fixes the issue.

OK, whew. Just solved this for myself also. As per above, just to sum up:

  1. Create an empty file in the main directory, auto-gpt.json
  2. change the .env file. Remove the .template extension. And make sure it’s associated with text file or similar.

Note that Mac, for whatever reason, can keep adding the .template extension after you remove it. You have to command i, look at the properties, remove the extension there and confirm you want to remove the extension.

Woo. Thanks all 😃 I now appear to have this working on my Macbook. M2.

You just need to rename the original ā€œ.env.templateā€ file to ā€œ.envā€, replace it with your key. Then create a new file called ā€œauto-gpt.jsonā€ in the root directory, as shown in the image below: c31d1dbf23cea977b82af0912fa6bfb

Then run the command in the terminal: python -m autogpt

Finally, it succeeded! image

I had the same error and fixed it thanks community!

I just created the auto-gpt.json file saved it, ran python -m autogpt and it worked!

ORIGINAL ERROR Warning: The file ā€˜auto-gpt.json’ does not exist. Local memory would not be saved to a file. Welcome to Auto-GPT! Enter the name of your AI and its role below. Entering nothing will load defaults. Name your AI: For example, ā€˜Entrepreneur-GPT’ AI Name:

I get this when I run it in a docker container

Can some one please confirm if paying the open AI API solved this issue?

Well, I setup my billing and still getting the same message, the .env is a env file type not a text or template as my mac was taking it, and the API key is there so not sure what else to try. has anyone got this working on mac?

just create a new file name auto-gpt.json in main folder Ok, did that now when I try error

I have the same issue is there a fix?

just create a new file name auto-gpt.json in main folder