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

fix: allow edge case of quickstart before run on first install #684

Merged
merged 2 commits into from
Dec 23, 2023

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Dec 22, 2023

Please describe the purpose of this pull request.

If the user runs quickstart before run on a fresh install (with no home dir created yet), you'll get an error on run:

  File "/home/cpacker/anaconda3/lib/python3.9/site-packages/memgpt/utils.py", line 182, in list_agent_config_files
    files = os.listdir(agent_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/home/cpacker/.memgpt/agents'

To fix this, the user has to then:

  • run memgpt configure (to trigger MemGPTConfig.create_config_dir())
  • run memgpt quickstart (to reset the values to the desired defaults)

Note @sarahwooders: we should probably add safeguards into list_agent_config_files to prevent crashing on empty dirs?

How to test

Delete ~/.memgpt, run memgpt quickstart as your initial command. On main, this bricks. On this PR it's fixed.

Have you tested this PR?

Yes

@cpacker cpacker merged commit 2e3bbd8 into main Dec 23, 2023
3 checks passed
@cpacker cpacker deleted the allow-quickstart-before-run branch December 23, 2023 20:09
norton120 pushed a commit to norton120/MemGPT that referenced this pull request Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant