-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ERROR: 'NoneType' object has no attribute 'encode_queries' #3173
Comments
Hello, I want to know the reason and whether it cause influence for everyone. |
I try to pull new docker image, and the problem still remain. |
It seems not embedding model found. |
### What problem does this PR solve? #3173 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
Hello. I pull the code from github and the lastest docker image (dev-slim), and the problem still remain. At the same time, the bug report is the same, and it display 'NoneType' object has no attribute 'encode_queries'. I note that you add the related code to test whether embedding model exist. But I do not know am I operating correctly. Do I need to connect Docker image to my local code? Or docker image already contains the running code? |
I come to update this bug. I find you have updated the docker image. After I change the .env to ragflow:dev, the problem is missing. But I am not sure if this bug will still exist when .env switching to ragflow:dev-slim. Since the code is now ready to run when using ragflow:dev, I may not update this issue again. Thank you for your cooperation! LOVE YOU! |
How can I reproduce your operation? I also encountered the same problem. Thank you |
More detailed information about the specific operation can be found in this project homepage. |
### What problem does this PR solve? infiniflow#3173 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
Is there an existing issue for the same bug?
Branch name
main
Commit ID
8d9238d
Other environment information
No response
Actual behavior
When I want to ask question with any chatbot, the problem encounter:
Expected behavior
No response
Steps to reproduce
Additional information
Traceback (most recent call last):
File "/ragflow/api/apps/conversation_app.py", line 181, in stream
for ans in chat(dia, msg, True, **req):
File "/ragflow/api/db/services/dialog_service.py", line 210, in chat
kbinfos = retr.retrieval(" ".join(questions), embd_mdl, tenant_ids, dialog.kb_ids, 1, dialog.top_n,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/rag/nlp/search.py", line 380, in retrieval
sres = self.search(req, [index_name(tid) for tid in tenant_ids], embd_mdl, highlight)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/rag/nlp/search.py", line 129, in search
s["knn"] = self._vector(
^^^^^^^^^^^^^
File "/ragflow/rag/nlp/search.py", line 58, in _vector
qv, c = emb_mdl.encode_queries(txt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/api/db/services/llm_service.py", line 217, in encode_queries
emd, used_tokens = self.mdl.encode_queries(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ragflow/rag/llm/embedding_model.py", line 92, in encode_queries
return self._model.encode_queries([text]).tolist()[0], token_count
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode_queries'
The text was updated successfully, but these errors were encountered: