From f496411da8d33a671373645d2c347f9d865e4228 Mon Sep 17 00:00:00 2001 From: Gregory <34886930+gregorylearns@users.noreply.github.com> Date: Wed, 11 Sep 2024 03:06:35 +0800 Subject: [PATCH] Updated error message to provide help for import if 'Legacy Import/Export' is enabled (#3399) * Updated error message to provide additional guidance for file import issues if Legacy Import/Export is enabled Enhanced the error message from "Unable to read file. It probably requires a newer version of Anki to import." to include a suggestion for users to try unchecking 'Legacy import/export Handling' under Preferences > Editing > Import/Export if they encounter the issue. * Update CONTRIBUTORS --- CONTRIBUTORS | 1 + qt/aqt/importing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index b0bb6b97d..28590930a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -189,6 +189,7 @@ Dillon Baldwin Voczi Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com> Themis Demetriades +Gregory Abrasaldo ******************** diff --git a/qt/aqt/importing.py b/qt/aqt/importing.py index ffc173a8b..b4a73b553 100644 --- a/qt/aqt/importing.py +++ b/qt/aqt/importing.py @@ -390,7 +390,7 @@ def importFile(mw: AnkiQt, file: str) -> None: showWarning(invalidZipMsg()) except MediaMapInvalid: showWarning( - "Unable to read file. It probably requires a newer version of Anki to import." + "Unable to read file. It probably requires a newer version of Anki to import. Try unchecking 'Legacy import/export Handling' under Preferences > Editing > Import/Export and see if the problem persists." ) except V2ImportIntoV1: showWarning(