-
Notifications
You must be signed in to change notification settings - Fork 5.8k
when using MongoDB as vector store getting AttributeError: 'tuple' object has no attribute 'id' for get_all function #3605
Description
🐛 Describe the bug
when using MongoDB as vector for get_all function I'm getting Attribute error for id as
INFO:mem0.vector_stores.mongodb:Retrieved document with ID '11cafe6b-211a-4a56-bd71-1b3e5c4bf833'.
INFO:mem0.vector_stores.mongodb:Retrieved 4 documents from collection 'memory'.
Traceback (most recent call last):
File "/Users/examples/try-mem0.py", line 80, in
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "/Users/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/Users/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/Users/examples/try-mem0.py", line 74, in main
memories = await m.get_all(run_id="john", user_id="john")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/venv/lib/python3.13/site-packages/mem0/memory/main.py", line 1748, in get_all
results_dict.update({"results": await vector_store_task})
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.venv/lib/python3.13/site-packages/mem0/memory/main.py", line 1772, in _get_all_from_vector_store
id=mem.id,
^^^^^^
AttributeError: 'tuple' object has no attribute 'id'
when I was following one of the example codes in docs I got this issue