{"record":{"id":"3e37f498391a9d89","repo":"HKUDS/DeepTutor","slug":"book-book-id-not-found","errorCode":null,"errorMessage":"Book {book_id} not found","messagePattern":"Book (.+?) not found","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/book/engine.py","lineNumber":448,"sourceCode":"        return book, proposal\n\n    async def _run_ideation(self, ctx: IdeationContext, language: str) -> BookProposal:\n        agent = IdeationAgent(language=language)\n        return await agent.process(ideation_context=ctx)\n\n    # ── Stage 2: Spine ───────────────────────────────────────────────────\n\n    async def confirm_proposal(\n        self,\n        *,\n        book_id: str,\n        edited_proposal: BookProposal | None = None,\n        stream: StreamBus | None = None,\n    ) -> tuple[Book, Spine]:\n        \"\"\"User confirms (and optionally edits) the proposal → run SpineAgent.\"\"\"\n        book = self.storage.load_book(book_id)\n        if book is None:\n            raise ValueError(f\"Book {book_id} not found\")\n\n        if edited_proposal is not None:\n            book.proposal = edited_proposal\n            book.title = edited_proposal.title or book.title\n            book.description = edited_proposal.description or book.description\n\n        bus = stream or get_book_bus(book_id)\n        bstream = BookStream(bus)\n\n        proposal = book.proposal or BookProposal(title=book.title)\n        inputs = self.storage.load_inputs(book.id) or BookInputs(\n            user_intent=book.title or \"\",\n            knowledge_bases=list(book.knowledge_bases),\n            language=book.language,\n        )\n\n        async with bstream.stage(STAGE_SPINE):\n            # ── Sub-stage 1: Source exploration ──────────────────────","sourceCodeStart":430,"sourceCodeEnd":466,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/book/engine.py#L430-L466","documentation":"Error \"Book {book_id} not found\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/book/engine.py:448 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"}