From 37fee2b5b2d90d92ac98751e0421be5e88193246 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Nov 2020 08:35:27 +0530 Subject: [PATCH] Also ignore traceback failure when showing startup failure dialog --- src/calibre/gui2/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 8455de17c3..8ab768ff89 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -291,10 +291,13 @@ class GuiRunner(QObject): try: self.start_gui(db) except Exception: + try: + details = traceback.format_exc() + except Exception: + details = '' self.show_error(_('Startup error'), _( 'There was an error during {0} startup. Parts of {0} may not function.' - ' Click Show details to learn more.').format(__appname__), - det_msg=traceback.format_exc()) + ' Click Show details to learn more.').format(__appname__), det_msg=details) def initialize_db(self): from calibre.db.legacy import LibraryDatabase