Find answers from the community

Updated 11 months ago

Just tried upgrading llama-index (python

Just tried upgrading llama-index (python) from 0.9.30 to 0.9.40 and got this error. Is this common and how do i fix this?

Plain Text
web-1          | [2024-02-01 10:55:21 +0000] [8] [ERROR] Exception in worker process
web-1          | Traceback (most recent call last):
web-1          |   File "/usr/local/lib/python3.11/site-packages/llama_index/storage/kvstore/mongodb_kvstore.py", line 69, in from_uri
web-1          |     from motor.motor_asyncio import AsyncIOMotorClient
web-1          | ModuleNotFoundError: No module named 'motor'
web-1          | 
web-1          | During handling of the above exception, another exception occurred:


Edit: Seems to be that the Mongo driver changed from pymongo to motor for some reason. Is this correct? I needed to change my requirements.txt unfortunately.
L
N
16 comments
Actually, its both pymongo and motor (motor is for async support)
We added async and batch support to storage backends
Where is the documentation for the new batch support?
Or maybe that is automated with the new release?
Documentation is maybe sparse haha

actually I'm looking at the code now, and it's kind jank for mongodb -- need to add the batch size as a kwarg to MongoDocumentStore.from_uri() :PSadge:
But basically, the idea is you set a batch size (default is 1), and it will batch insert things
Ahh okay cool
So no way to really do that for now>?
Not at the moment, need to make a PR πŸ˜…
Would you like me to create an issue for it in the repo?
Motivation for me to get to it and close an issue πŸ˜†
Haha πŸ˜›
Add a reply
Sign up and join the conversation on Discord