Skip to content

[BUG] 简洁阐述问题 / langchain 部署 出现bug 怎么调试都是api错误 #5426

@jackrous

Description

@jackrous

TypeError: 'NoneType' object is not iterable
2025-12-22 15:50:24.269 | ERROR | chatchat.webui_pages.utils:get:64 - InvalidURL: error when get /knowledge_base/list_knowledge_bases: Invalid port: ':1'
2025-12-22 15:50:24.300 | ERROR | chatchat.webui_pages.utils:get:64 - InvalidURL: error when get /knowledge_base/list_knowledge_bases: Invalid port: ':1'
2025-12-22 15:50:24.328 | ERROR | chatchat.webui_pages.utils:get:64 - InvalidURL: error when get /knowledge_base/list_knowledge_bases: Invalid port: ':1'
2025-12-22 15:50:24.329 | ERROR | chatchat.webui_pages.utils:to_json:233 - AttributeError: API未能返回正确的JSON。'NoneType' object has no attribute 'json'
2025-12-22 15:50:24.329 Uncaught app exception
Traceback (most recent call last):
File "/home/boss/Llama-factory/conda/envs/chatchat/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.dict)
File "/home/boss/Llama-factory/conda/envs/chatchat/lib/python3.10/site-packages/chatchat/webui.py", line 71, in
kb_chat(api=api)
File "/home/boss/Llama-factory/conda/envs/chatchat/lib/python3.10/site-packages/chatchat/webui_pages/kb_chat.py", line 118, in kb_chat
kb_list = [x["kb_name"] for x in api.list_knowledge_bases()]
TypeError: 'NoneType' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    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