Skip to content

[Bug]: Ragflow 0.17.2 Chat selection error when using knowledge graph #6440

Open
@hnxylz

Description

@hnxylz

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

don't know

RAGFlow image version

0.17.2-slim

Other environment information

Actual behavior

2025-03-24 11:01:17,053 ERROR 18 Object of type coroutine is not JSON serializable
2025-03-24 11:01:17 Traceback (most recent call last):
2025-03-24 11:01:17 File "/ragflow/graphrag/search.py", line 158, in retrieval
2025-03-24 11:01:17 ty_kwds, ents = self.query_rewrite(llm, qst, [index_name(tid) for tid in tenant_ids], kb_ids)
2025-03-24 11:01:17 File "/ragflow/graphrag/search.py", line 46, in query_rewrite
2025-03-24 11:01:17 TYPE_POOL=json.dumps(ty2ents, ensure_ascii=False, indent=2))
2025-03-24 11:01:17 File "/usr/lib/python3.10/json/init.py", line 238, in dumps
2025-03-24 11:01:17 **kw).encode(obj)
2025-03-24 11:01:17 File "/usr/lib/python3.10/json/encoder.py", line 201, in encode
2025-03-24 11:01:17 chunks = list(chunks)
2025-03-24 11:01:17 File "/usr/lib/python3.10/json/encoder.py", line 438, in _iterencode
2025-03-24 11:01:17 o = _default(o)
2025-03-24 11:01:17 File "/ragflow/api/utils/init.py", line 148, in default
2025-03-24 11:01:17 return json.JSONEncoder.default(self, obj)
2025-03-24 11:01:17 File "/usr/lib/python3.10/json/encoder.py", line 179, in default
2025-03-24 11:01:17 raise TypeError(f'Object of type {o.class.name} '
2025-03-24 11:01:17 TypeError: Object of type coroutine is not JSON serializable

Expected behavior

No response

Steps to reproduce

Step-1 Extracting Knowledge Graph
Step 2: Create a chat assistant and prompt the engine to set up knowledge graph usage
Step-3 Testing raises questions
Error result: ERROR: float() argument must be a string or a real number, not 'NoneType'

Additional information

No response

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions