HKUDS/DeepTutor · error · ValueError
Cannot rebuild book – missing book/spine ({book_id})
Error message
Cannot rebuild book – missing book/spine ({book_id}) What it means
Error "Cannot rebuild book – missing book/spine ({book_id})" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/book/engine.py:975
except ValueError:
return False
except Exception: # noqa: BLE001
logger.warning(f"auto-resume failed for {book_id}", exc_info=True)
return False
return True
async def rebuild_book(
self,
*,
book_id: str,
stream: StreamBus | None = None,
auto_compile: bool = True,
) -> list[Page]:
"""Regenerate all pages while preserving the confirmed proposal/spine."""
book = self.storage.load_book(book_id)
spine = self.storage.load_spine(book_id)
if book is None or spine is None:
raise ValueError(f"Cannot rebuild book – missing book/spine ({book_id})")
await self._halt_compilation(book_id)
for page in self.storage.list_pages(book_id):
self.storage.delete_page(book_id, page.id)
for chapter in spine.chapters:
chapter.page_ids = []
self.storage.save_spine(spine)
self.storage.save_progress(Progress(book_id=book_id))
book.status = BookStatus.SPINE_READY
book.page_count = 0
book.updated_at = time.time()
self.storage.save_book(book)
self.storage.append_log(
book_id,
f"rebuild requested (preserve_spine=true, auto_compile={auto_compile})",
op="rebuild",View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/book/engine.py:975 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/1424c13f8b14b06f.
Report an issue: GitHub.