Bug: wiki.py sources/knowledge 子目录未创建导致 /ask 接口 500 #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
访问
/ask接口提问时报 500 错误:前端表现为「网络出现点问题」。
原因分析
tutor/wiki.py的StudentWiki.__init__只mkdir了wiki_dir,但没有创建子目录sources_dir和knowledge_dir。ingest_session()直接往sources_dir写文件时目录不存在。修复方案
在
__init__末尾、_ensure_schema()之前补上:复现步骤
环境