HKUDS/DeepTutor · error · GenerationFailure
LLM did not return any timeline events.
Error message
LLM did not return any timeline events.
What it means
Empty-result guard in the timeline block generator: the LLM call succeeded and JSON was parsed, but the 'events' key was absent or held no usable dict items, so there is no timeline to render.
Solutions
- Retry generation with a lower temperature or a stricter prompt that demands a JSON 'events' array
- Fall back to a deterministic placeholder timeline (or hide the block) when the model returns nothing
- Validate the parsed shape before slicing and re-ask once on empty output
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at deeptutor/book/blocks/timeline.py:57 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/4cdace1ab05fdef1.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/book/blocks/timeline.py:57
temperature=0.4,
language=ctx.language,
expected_key="events",
)
events_raw = data.get("events") if isinstance(data, dict) else None
events: list[dict[str, str]] = []
if isinstance(events_raw, list):
for item in events_raw[:8]:
if not isinstance(item, dict):
continue
events.append(
{
"date": str(item.get("date") or "")[:80],
"title": str(item.get("title") or "")[:160],
"description": str(item.get("description") or "")[:600],
}
)
if not events:
raise GenerationFailure("LLM did not return any timeline events.")
return (
{"events": events},
[],
data.get("_metadata") if isinstance(data.get("_metadata"), dict) else {},
)
__all__ = ["TimelineGenerator"]
View on GitHub (pinned to 3e82f13042)