High severity HTTP 404 beginner · 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 404 error when attempting to query or insert vectors.

Stack trace

traceback
qdrant_client.http.exceptions.QdrantCollectionNotFoundError: Collection 'my_collection' not found
  File "/app/main.py", line 42, in query_vectors
    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 by creating it with client.recreate_collection() or client.create_collection() before any queries or inserts.

Why it happens

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

Detection

Monitor API responses for HTTP 404 errors from Qdrant client calls and log the collection name being accessed to catch missing collections before critical failures.

Causes & fixes

1

The collection name used in the client call does not exist on the Qdrant server.

✓ Fix

Verify the collection name spelling and create the collection on the Qdrant server before querying or inserting.

2

The collection was deleted or dropped after initial creation.

✓ Fix

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

3

The Qdrant client is connected to the wrong server or environment where the collection is missing.

✓ Fix

Check and correct the Qdrant server URL and environment configuration to point to the correct instance.

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(host=os.environ['QDRANT_HOST'], port=int(os.environ['QDRANT_PORT']))

# Create collection if missing 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)  # Works without error now
Added a check to create the collection if it does not exist before searching, preventing the collection not found error.

Workaround

Catch QdrantCollectionNotFoundError exceptions, then create the missing collection dynamically before retrying the operation.

Prevention

Implement initialization routines that ensure all required collections exist on Qdrant before runtime, and use environment-specific configs to avoid connecting to wrong servers.

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.