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

AttributeError: 'NoneType' object has no attribute 'text' #1393

Open
2 tasks
aBaldoqui opened this issue May 17, 2024 · 2 comments
Open
2 tasks

AttributeError: 'NoneType' object has no attribute 'text' #1393

aBaldoqui opened this issue May 17, 2024 · 2 comments
Assignees

Comments

@aBaldoqui
Copy link

Describe the bug
When running the command sudo memgpt run --persona "personatest" --human "humantest", the system reports that it cannot find the human in the database and prompts to create it. However, when executing memgpt list humans and memgpt list personas, both the human and persona are listed as existing.

Please describe your setup

  • How did you install memgpt?
    • git clone
  • Describe your setup
    • OS:Linux
    • Terminal
  🧬 Creating new agent...
Couldn't find human {human} in database, please run `memgpt add human`
Couldn't find persona {persona} in database, please run `memgpt add persona`
Traceback (most recent call last):
  File "/home/d0/codes/MemGPT/venv/bin/memgpt", line 8, in <module>
    sys.exit(app())
             ^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/typer/main.py", line 328, in __call__
    raise e
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/typer/core.py", line 783, in main
    return _main(
           ^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/typer/core.py", line 225, in _main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/venv/lib/python3.12/site-packages/typer/main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0/codes/MemGPT/memgpt/cli/cli.py", line 645, in run
    preset_obj.human = ms.get_human(human, user.id).text
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'

@aBaldoqui
Copy link
Author

I've identified the issue. When I run memgpt list humans, it uses the SQLite database located at sqlite:////home/d0/.memgpt/sqlite.db, which contains the saved humans and personas. However, when I run sudo memgpt list humans, it uses a different SQLite database located at sqlite:////root/.memgpt/sqlite.db. As a result, it does not find the humans and personas that were created previously.

Considering the current situation where memgpt seems to utilize different database locations based on user permissions (/home/d0/.memgpt/sqlite.db for regular user and /root/.memgpt/sqlite.db for sudo), would it be feasible to explore the option of consolidating these into a single database location? This could help streamline the user experience and prevent potential discrepancies in accessing saved data.

@cpacker
Copy link
Owner

cpacker commented May 26, 2024

@sarahwooders this seems like a bug?

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

No branches or pull requests

3 participants