Closed gtesei closed 2 weeks ago
The AttributeError: 'NoneType' object has no attribute 'search'
you're encountering suggests that the QdrantVectorStore
instance's client (_client
or _aclient
) is None
when the search operation is attempted. This typically happens if the client was not properly initialized, which could be due to missing or incorrect initialization parameters, or if there's a flaw in the logic that sets up these client instances.
To address this issue, ensure the following:
Proper Initialization: When creating the QdrantVectorStore
instance, make sure to either pass a valid client
or aclient
instance directly or provide all necessary parameters (url
, api_key
, and collection_name
) so the class can initialize its own client instances correctly.
Initialization Logic Check: Review the code that initializes the QdrantVectorStore
to confirm it's correctly handling the initialization parameters. It's crucial that this part of your code does not ignore or mishandle any errors that might occur during the initialization process.
Client Instance Checks: Consider adding checks in the methods that utilize _client
or _aclient
to verify these are not None
before using them. This can prevent unclear errors and allow for more graceful error handling or clearer messaging when something goes wrong.
If these steps do not resolve the issue, it might be helpful to look into the QdrantVectorStore
class's initialization method to ensure it's designed to handle the client setup correctly, especially in scenarios where the setup might fail or be skipped inadvertently.
As explained above QdrantVectorStore
is properly initialized, as it is populated with the text chunks of the paper. This is the standard output:
>> FEED vectorstore ...
Generating embeddings for level 0.
Performing clustering for level 0.
Generating summaries for level 0 with 15 clusters.
Level 0 created summaries/clusters: 15
Generating embeddings for level 1.
Performing clustering for level 1.
Generating summaries for level 1 with 3 clusters.
Level 1 created summaries/clusters: 3
Generating embeddings for level 2.
Performing clustering for level 2.
Generating summaries for level 2 with 1 clusters.
Level 2 created summaries/clusters: 1
Bug Description
I'm trying to use RaptorPack/RaptorRetriever with qdrant as vectorstore. Here's the code I'm using following https://github.com/run-llama/llama_index/blob/main/llama-index-packs/llama-index-packs-raptor/examples/raptor.ipynb .
Although it is possible to feed the vectorstore, when I build the RaptorRetriever I got this exception:
Version
0.10.27
Steps to Reproduce
wget https://arxiv.org/pdf/2401.18059.pdf -O ./raptor_paper.pdf
python <code above>
Relevant Logs/Tracbacks