HKUDS/DeepTutor · error · HTTPException
Knowledge base is not assigned to you
Error message
Knowledge base is not assigned to you
What it means
resolve_kb (non-admin branch, requested_source='admin'): the user asked for an admin-curated knowledge base by name, but that name is not in their assigned set — the KB exists on the admin side but was never assigned to this user, so access is denied with HTTP 403.
Solutions
- Ask an admin to assign the KB to the user's grants
- Use the exact assigned KB name (check assignment spelling) or drop source='admin'
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at deeptutor/multi_user/knowledge_access.py:90 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/a17ea072db7c602a.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/multi_user/knowledge_access.py:90
if user.is_admin:
manager = admin_kb_manager()
resolved = _resolve_default_or_name(manager, name)
return KnowledgeResource(
id=f"admin:kb:{resolved}",
name=resolved,
base_dir=admin_kb_base_dir(),
source="admin",
assigned=False,
read_only=False,
)
user_manager = current_kb_manager()
assigned_names = _assigned_admin_names()
if requested_source == "admin":
if name not in assigned_names:
raise HTTPException(status_code=403, detail="Knowledge base is not assigned to you")
if require_write:
raise HTTPException(
status_code=403, detail="Assigned admin knowledge bases are read-only"
)
return KnowledgeResource(
id=f"admin:kb:{name}",
name=name,
base_dir=admin_kb_base_dir(),
source="admin",
assigned=True,
read_only=True,
)
if requested_source == "user":
resolved = _resolve_default_or_name(user_manager, name)
return KnowledgeResource(
id=f"user:kb:{resolved}",
name=resolved,View on GitHub (pinned to 3e82f13042)