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

Error on GET /api/agents running memgpt server with postgres #1326

Open
sarahwooders opened this issue May 3, 2024 · 0 comments
Open

Error on GET /api/agents running memgpt server with postgres #1326

sarahwooders opened this issue May 3, 2024 · 0 comments

Comments

@sarahwooders
Copy link
Collaborator

INFO:     ::1:49155 - "GET /api/agents HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 1106, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/middleware/cors.py", line 83, in __call__
    await self.app(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/fastapi/routing.py", line 274, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/sarahwooders/Library/Caches/pypoetry/virtualenvs/pymemgpt-7LnUJ2_3-py3.12/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/repos/memgpt-main/MemGPT/memgpt/server/rest_api/agents/index.py", line 50, in list_agents
    agents_data = server.list_agents(user_id=user_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/repos/memgpt-main/MemGPT/memgpt/server/server.py", line 858, in list_agents
    memgpt_agent = self._get_or_load_agent(user_id=user_id, agent_id=agent_state.id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/repos/memgpt-main/MemGPT/memgpt/server/server.py", line 359, in _get_or_load_agent
    memgpt_agent = self._load_agent(user_id=user_id, agent_id=agent_id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/repos/memgpt-main/MemGPT/memgpt/server/server.py", line 342, in _load_agent
    memgpt_agent = Agent(agent_state=agent_state, interface=interface)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sarahwooders/repos/memgpt-main/MemGPT/memgpt/agent.py", line 308, in __init__
    assert all([isinstance(msg, Message) for msg in raw_messages]), (raw_messages, self.agent_state.state["messages"])
AssertionError: ([None, None, None, None, None, None, None, None, None, None], ['b30114a1-2130-4e0f-92c1-6ddb9cf02f76', 'ceeb2a79-b37a-4557-9b69-3706677946d5', '5b410457-90e6-4005-b02e-082ddfd27cbf', '76766496-50ba-4b68-adbc-cab7bd0b8181', 'cd1dacfc-a6f8-47c0-be15-85efcdfe5fa7', 'ffe109bc-3047-4e2a-8131-9ff2f9aa4e5f', 'f050a6e9-510b-4e4f-a12d-e426dd7f10c4', '2568d345-4951-4386-8e90-fd37db023901', 'c55d9851-2d96-4579-9634-4c2e5ab23825', 'e6842206-2192-42b7-bdc5-63e15367063b'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant