Find answers from the community

Updated 3 months ago

Exception ignored in: <function

Exception ignored in: <function QdrantClient.del at 0x135be9580>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 129, in del
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 136, in close
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/qdrant_client/local/qdrant_local.py", line 59, in close
TypeError: 'NoneType' object is not callable



for below code:

for doc in docs:
if "content_text" in doc:
doc_content = doc["content_text"]
doc_id = doc["document_id"]
print(doc_id)
documents.append(
Document(
text=doc_content,
metadata={"file_name": docid,"date": str(datetime.now())}, id=doc_id,
description=f"Useful to answer question related to file name or id {doc_id}",
)
)
client = QdrantClient(path="./qdrant_data")
vector_store = QdrantVectorStore(
"chatbot", client=client, enable_hybrid=True, batch_size=20
)

storage_context = StorageContext.from_defaults(vector_store=vector_store)
service_context = ServiceContext.from_defaults(
chunk_size=512
)
index = VectorStoreIndex.from_documents(documents,
storage_context=storage_context,
service_context=service_context,
show_progress=True)
index.storage_context.persist(persist_dir="./storage")

index = load_index_from_storage(
StorageContext.from_defaults(persist_dir="./storage")
)
W
L
7 comments
This is not actually an error
I always see this at the end of the script, something about qdrant not deleting it client connection properly
But everything still works, since it's happening when the script is shutting down
If you run again and connect to your qdrant index, you'll see all the data is there and you can query it
But also, with chroma, you don't need to use persist
To load it, just do

Plain Text
index = VectorStoreIndex.from_vector_store(vector_store, service_context=service_context)
Add a reply
Sign up and join the conversation on Discord