MaxKB icon indicating copy to clipboard operation
MaxKB copied to clipboard

[Bug] Regarding the problem that the conversation record cannot be exported due to abnormal conversation content

Open sometimecry opened this issue 2 months ago • 3 comments

Contact Information

[email protected]

MaxKB Version

v1.10.10 lts

Problem Description

对话记录导出的问题,当遇到AI回答是502 gateway nginx,我点击导出对话记录无任何的反应,前端报错500 internal server error,查询系统报错内容是 TypeError: sequence item 0: expected str instance, NoneType found 10.128.20.121 [29/Oct/2025:17:10:09 +0800] 0.000944s "POST /api/application/cf2949f6-8964-11f0-bb6b-0242ac010002/chat/export?start_time=2025-10-22&end_time=2025-10-29&min_star=0&min_trample=0&comparer=and HTTP/1.1" 500 0

Steps to Reproduce

让对话内容出现异常值

The expected correct result

No response

Related log output


Additional Information

No response

sometimecry avatar Oct 30 '25 02:10 sometimecry

完整报错内容:Traceback (most recent call last): File "/opt/py3/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 281, in handle keepalive = self.handle_request(req, conn) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/py3/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 338, in handle_request for item in respiter: File "/opt/maxkb/app/apps/application/serializers/chat_serializers.py", line 265, in stream_response for col_idx, value in enumerate(self.to_row(row), 1): ^^^^^^^^^^^^^^^^ File "/opt/maxkb/app/apps/application/serializers/chat_serializers.py", line 202, in to_row padding_problem_text = ' '.join(node.get("answer", "") for key, node in details.items() if ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: sequence item 0: expected str instance, NoneType found 10.128.20.121 [29/Oct/2025:17:10:09 +0800] 0.000944s "POST /api/application/cf2949f6-8964-11f0-bb6b-0242ac010002/chat/export?start_time=2025-10-22&end_time=2025-10-29&min_star=0&min_trample=0&comparer=and HTTP/1.1" 500 0

sometimecry avatar Oct 30 '25 02:10 sometimecry

感谢反馈,后续版本修复。

Shenguobin0102 avatar Oct 31 '25 01:10 Shenguobin0102

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thanks for the feedback, it will be fixed in subsequent versions.

shaohuzhang1 avatar Oct 31 '25 01:10 shaohuzhang1