{"record":{"id":"27bbbe6e4158174c","repo":"HKUDS/DeepTutor","slug":"no-spine-for-book-book-id","errorCode":null,"errorMessage":"No spine for book {book_id}","messagePattern":"No spine for book (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/book/engine.py","lineNumber":782,"sourceCode":"        book_id: str,\n        edited_spine: Spine | None = None,\n        stream: StreamBus | None = None,\n        auto_compile: bool = True,\n    ) -> list[Page]:\n        \"\"\"User confirms (or edits) the spine → create pending page shells.\n\n        BookEngine v2: automatically injects an **Overview** chapter at order 0\n        whose page is fully pre-built (deterministic concept-graph render +\n        intro text + chapter index). The rest of the chapters are queued for\n        normal compilation.\n        \"\"\"\n        book = self.storage.load_book(book_id)\n        if book is None:\n            raise ValueError(f\"Book {book_id} not found\")\n\n        spine = edited_spine or self.storage.load_spine(book_id)\n        if spine is None:\n            raise ValueError(f\"No spine for book {book_id}\")\n        if edited_spine is not None:\n            spine.book_id = book_id\n            self.storage.save_spine(spine)\n\n        # Chapters the reader deleted must not survive on the concept map.\n        dropped = _prune_concept_graph(spine)\n        if dropped:\n            self.storage.append_log(\n                book_id,\n                f\"pruned {dropped} concept-graph node(s) for deleted chapters\",\n                op=\"confirm_spine\",\n            )\n\n        # ── Inject Overview chapter (idempotent) ─────────────────────\n        spine = await self._ensure_overview_chapter(spine, book, stream=stream)\n        self.storage.save_spine(spine)\n\n        existing = {p.chapter_id: p for p in self.storage.list_pages(book_id)}","sourceCodeStart":764,"sourceCodeEnd":800,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/book/engine.py#L764-L800","documentation":"Error \"No spine for book {book_id}\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/book/engine.py:782 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}