Fix #2104281 [Error: Unhandled exception when deleting entries](https://bugs.launchpad.net/calibre/+bug/2104281)

This commit is contained in:
Kovid Goyal 2025-03-27 02:59:25 +05:30
parent e4da8e2172
commit 967027a22d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -84,7 +84,10 @@ def set_html(mi, html, text_browser):
search_paths = []
db, _ = db_for_mi(mi)
if db and book_id is not None:
path = db.abspath(book_id, index_is_id=True)
try:
path = db.abspath(book_id, index_is_id=True)
except Exception: # deleted book
path = ''
if path:
search_paths = [path]
text_browser.setSearchPaths(search_paths)