Skip to content

[Bug] Export dialogue log 500 #2958

@winslis2

Description

@winslis2

Contact Information

No response

MaxKB Version

v1.10.4-lts

Problem Description

导出3.4号对话日志接口500

Steps to Reproduce

系统选择导出3.4号数据必现

The expected correct result

No response

Related log output

docker容器日志/opt/maxkb/app/data/logs gunicorn.log 错误如下
[22/Apr/2025:18:08:02 +0800] 0.057830s "POST /api/application/9a9d3a36-71b8-11ef-b159-0242ac110002/chat/export?start_time=2025-03-03&end_time=2025-03-05&min_star=0&min_trample=0&comparer=and HTTP/1.0" 200 0
[2025-04-22 18:08:02 +0800] [22898] [ERROR] Error handling request /api/application/9a9d3a36-71b8-11ef-b159-0242ac110002/chat/export?start_time=2025-03-03&end_time=2025-03-05&min_star=0&min_trample=0&comparer=and
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 257, 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 218, in to_row
    for index in range(len(improve_paragraph_list))]),
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions