From 07343f6c9f5ed17a32625790e677dffc7b4519a6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 16 Apr 2020 09:47:34 +1000 Subject: [PATCH] show a clearer error if the schema is too new will hold off on making it translatable for now --- qt/aqt/main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 02a146982..bb1eee453 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -457,9 +457,12 @@ close the profile or restart Anki.""" try: self._loadCollection() except Exception as e: - showWarning( - tr(TR.ERRORS_UNABLE_OPEN_COLLECTION) + "\n" + traceback.format_exc() - ) + if "FileTooNew" in str(e): + showWarning("This profile requires a newer version of Anki to open. Did you forget to use the Downgrade button prior to switching Anki versions?") + else: + showWarning( + tr(TR.ERRORS_UNABLE_OPEN_COLLECTION) + "\n" + traceback.format_exc() + ) # clean up open collection if possible if self.col: try: