High severity HTTP 404 intermediate · Fix: 2-5 min

QdrantCollectionNotFoundError

qdrant_client.http.exceptions.QdrantCollectionNotFoundError

What this error means
The Qdrant client failed to find the specified collection, causing a payload error when querying or inserting vectors.

Stack trace

traceback
qdrant_client.http.exceptions.QdrantCollectionNotFoundError: Collection 'my_collection' not found
  File "/app/rag_qdrant.py", line 42, in query_collection
    response = client.search(collection_name='my_collection', query_vector=vec)
  File "/usr/local/lib/python3.9/site-packages/qdrant_client/http/api_client.py", line 123, in search
    raise QdrantCollectionNotFoundError(f"Collection '{collection_name}' not found")
QUICK FIX
Ensure the collection exists in Qdrant by creating it before any queries or inserts using client.recreate_collection or client.create_collection.

Why it happens

This error occurs when the Qdrant client attempts to access a collection that does not exist in the Qdrant database. It can happen if the collection was never created, was deleted, or the collection name is misspelled in the code.

Detection

Catch QdrantCollectionNotFoundError exceptions during collection access calls and log the collection name to verify existence before proceeding.

Causes & fixes

1

The collection name specified in the client call does not exist in Qdrant.

✓ Fix

Create the collection in Qdrant before querying or inserting, or verify the collection name matches exactly.

2

The collection was deleted or dropped after initial creation.

✓ Fix

Recreate the collection or update the code to use an existing collection.

3

Typo or case mismatch in the collection name string used in the code.

✓ Fix

Double-check and correct the collection name string to match the exact name in Qdrant.

Code: broken vs fixed

Broken - triggers the error
python
from qdrant_client import QdrantClient

client = QdrantClient()

# This line triggers QdrantCollectionNotFoundError if collection doesn't exist
results = client.search(collection_name='my_collection', query_vector=[0.1, 0.2, 0.3])
Fixed - works correctly
python
import os
from qdrant_client import QdrantClient

client = QdrantClient(api_key=os.environ.get('QDRANT_API_KEY'))

# Create collection if not exists before searching
if 'my_collection' not in [col.name for col in client.get_collections().collections]:
    client.recreate_collection(collection_name='my_collection', vector_size=3, distance='Cosine')

results = client.search(collection_name='my_collection', query_vector=[0.1, 0.2, 0.3])
print(results)  # Now works without error
Added a check to create the collection if it does not exist before querying, preventing the collection not found error.

Workaround

Wrap the search or insert calls in try/except QdrantCollectionNotFoundError, and on exception, create the collection dynamically before retrying the operation.

Prevention

Implement collection existence checks and automated creation during app startup or deployment to ensure collections are always present before any RAG operations.

Python 3.9+ · qdrant-client >=1.0.0 · tested on 1.2.x
Verified 2026-04
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.