qdrant vector store is not working - 'NoneType' object has no attribute 'collection_exists' #2450

Closed
opened 2025-11-11 15:07:33 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @forcewake on GitHub (Oct 24, 2024).

Bug Report

Looks like new QdrantClient doesn't work properly - I've got 'NoneType' object has no attribute 'collection_exists' each time I've tried to upload file (from chat ui, from knowledge base and etc)

Installation Method

docker

Environment

  • Open WebUI Version: [v0.3.33]

  • Ollama (if applicable): [v0.3.14]

  • Operating System: [Windows 11]

  • Browser (if applicable): [Edge Version 130.0.2849.46 (Official build) (64-bit)]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

[Describe what you expected to happen.]

Actual Behavior:

qdrant is up and running

I've got 'NoneType' object has no attribute 'collection_exists' each time I've tried to upload file (from chat ui, from knowledge base and etc).

Description

Bug Summary:
[Provide a brief but clear summary of the bug]

Reproduction Details

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

Logs and Screenshots

Browser Console Logs:

{id: 'ad6c21eb-74b3-4446-9017-be5a526672ad', user_id: 'f1d07687-363e-45b4-9531-a6eceaac6d1f', hash: null, filename: 'ad6c21eb-74b3-4446-9017-be5a526672ad_1.THE_RED_BULL_RACING (1).pdf', path: '/app/backend/data/uploads/ad6c21eb-74b3-4446-9017-be5a526672ad_1.THE_RED_BULL_RACING (1).pdf', …}
index.ts:144 
        
        
        POST https://open-webui.forcewake.duckdns.org/api/v1/knowledge/c54bdbe9-7f3c-4b6e-a2df-d697774e3eb6/file/add 400 (Bad Request)
window.fetch @ fetcher.js:76
u @ index.ts:144
ke @ Collection.svelte:356
g @ Collection.svelte:165
await in g
Me @ Collection.svelte:584
Show 1 more frame
Show less
[NEW] Explain Console errors by using Copilot in Edge: click
         
         to explain an error. 
        Learn more
        Don't show again
index.ts:165 {detail: "400: 'NoneType' object has no attribute 'collection_exists'"}

Docker Container Logs:

IINFO  [open_webui.apps.retrieval.main] save_docs_to_vector_db [Document(metadata={'Content-Type': 'application/pdf'}, page_content='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')] file-ad6c21eb-74b3-4446-9017-be5a526672ad
ERROR [open_webui.apps.retrieval.main] 'NoneType' object has no attribute 'collection_exists'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/main.py", line 888, in process_file
    raise e
  File "/app/backend/open_webui/apps/retrieval/main.py", line 862, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/main.py", line 650, in save_docs_to_vector_db
    result = VECTOR_DB_CLIENT.query(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query
    if not self.has_collection(collection_name):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection
    return self.client.collection_exists(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'collection_exists'
ERROR [open_webui.apps.webui.routers.files] 400: 'NoneType' object has no attribute 'collection_exists'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/main.py", line 888, in process_file
    raise e
  File "/app/backend/open_webui/apps/retrieval/main.py", line 862, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/main.py", line 650, in save_docs_to_vector_db
    result = VECTOR_DB_CLIENT.query(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query
    if not self.has_collection(collection_name):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection
    return self.client.collection_exists(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'collection_exists'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/apps/webui/routers/files.py", line 71, in upload_file
    process_file(ProcessFileForm(file_id=id))
  File "/app/backend/open_webui/apps/retrieval/main.py", line 897, in process_file
    raise HTTPException(
fastapi.exceptions.HTTPException: 400: 'NoneType' object has no attribute 'collection_exists'
ERROR [open_webui.apps.webui.routers.files] Error processing file: ad6c21eb-74b3-4446-9017-be5a526672ad
INFO:     192.168.1.1:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK
ERROR [open_webui.apps.retrieval.main] 'NoneType' object has no attribute 'collection_exists'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/main.py", line 798, in process_file
    result = VECTOR_DB_CLIENT.query(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query
    if not self.has_collection(collection_name):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection
    return self.client.collection_exists(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'collection_exists'
INFO:     192.168.1.1:0 - "POST /api/v1/knowledge/c54bdbe9-7f3c-4b6e-a2df-d697774e3eb6/file/add HTTP/1.1" 400 Bad Request

Screenshots/Screen Recordings (if applicable):
image

Additional Information

I know that it is new feature and was not share public yet but it's already in main branch.

Originally created by @forcewake on GitHub (Oct 24, 2024). # Bug Report Looks like new `QdrantClient` doesn't work properly - I've got `'NoneType' object has no attribute 'collection_exists'` each time I've tried to upload file (from chat ui, from knowledge base and etc) ## Installation Method docker ## Environment - **Open WebUI Version:** [v0.3.33] - **Ollama (if applicable):** [v0.3.14] - **Operating System:** [Windows 11] - **Browser (if applicable):** [Edge Version 130.0.2849.46 (Official build) (64-bit)] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: [Describe what you expected to happen.] ## Actual Behavior: qdrant is up and running I've got `'NoneType' object has no attribute 'collection_exists'` each time I've tried to upload file (from chat ui, from knowledge base and etc). ## Description **Bug Summary:** [Provide a brief but clear summary of the bug] ## Reproduction Details **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] ## Logs and Screenshots **Browser Console Logs:** ``` {id: 'ad6c21eb-74b3-4446-9017-be5a526672ad', user_id: 'f1d07687-363e-45b4-9531-a6eceaac6d1f', hash: null, filename: 'ad6c21eb-74b3-4446-9017-be5a526672ad_1.THE_RED_BULL_RACING (1).pdf', path: '/app/backend/data/uploads/ad6c21eb-74b3-4446-9017-be5a526672ad_1.THE_RED_BULL_RACING (1).pdf', …} index.ts:144 POST https://open-webui.forcewake.duckdns.org/api/v1/knowledge/c54bdbe9-7f3c-4b6e-a2df-d697774e3eb6/file/add 400 (Bad Request) window.fetch @ fetcher.js:76 u @ index.ts:144 ke @ Collection.svelte:356 g @ Collection.svelte:165 await in g Me @ Collection.svelte:584 Show 1 more frame Show less [NEW] Explain Console errors by using Copilot in Edge: click to explain an error. Learn more Don't show again index.ts:165 {detail: "400: 'NoneType' object has no attribute 'collection_exists'"} ``` **Docker Container Logs:** ``` IINFO [open_webui.apps.retrieval.main] save_docs_to_vector_db [Document(metadata={'Content-Type': 'application/pdf'}, page_content='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')] file-ad6c21eb-74b3-4446-9017-be5a526672ad ERROR [open_webui.apps.retrieval.main] 'NoneType' object has no attribute 'collection_exists' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/main.py", line 888, in process_file raise e File "/app/backend/open_webui/apps/retrieval/main.py", line 862, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/main.py", line 650, in save_docs_to_vector_db result = VECTOR_DB_CLIENT.query( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query if not self.has_collection(collection_name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection return self.client.collection_exists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'collection_exists' ERROR [open_webui.apps.webui.routers.files] 400: 'NoneType' object has no attribute 'collection_exists' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/main.py", line 888, in process_file raise e File "/app/backend/open_webui/apps/retrieval/main.py", line 862, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/main.py", line 650, in save_docs_to_vector_db result = VECTOR_DB_CLIENT.query( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query if not self.has_collection(collection_name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection return self.client.collection_exists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'collection_exists' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/apps/webui/routers/files.py", line 71, in upload_file process_file(ProcessFileForm(file_id=id)) File "/app/backend/open_webui/apps/retrieval/main.py", line 897, in process_file raise HTTPException( fastapi.exceptions.HTTPException: 400: 'NoneType' object has no attribute 'collection_exists' ERROR [open_webui.apps.webui.routers.files] Error processing file: ad6c21eb-74b3-4446-9017-be5a526672ad INFO: 192.168.1.1:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK ERROR [open_webui.apps.retrieval.main] 'NoneType' object has no attribute 'collection_exists' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/main.py", line 798, in process_file result = VECTOR_DB_CLIENT.query( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 97, in query if not self.has_collection(collection_name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py", line 66, in has_collection return self.client.collection_exists( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'collection_exists' INFO: 192.168.1.1:0 - "POST /api/v1/knowledge/c54bdbe9-7f3c-4b6e-a2df-d697774e3eb6/file/add HTTP/1.1" 400 Bad Request ``` **Screenshots/Screen Recordings (if applicable):** ![image](https://github.com/user-attachments/assets/b1bd910a-4eb6-4162-994a-8713e1e67874) ## Additional Information I know that it is new feature and was not share public yet but it's already in main branch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2450