diff --git a/aqt/importing.py b/aqt/importing.py index 5b9b028a4..f506a8437 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -282,9 +282,13 @@ def onImport(mw): try: importer.run() except Exception, e: - msg = _("Import failed.\n") - msg += unicode(traceback.format_exc(), "ascii", "replace") - showText(msg) + if "invalidFile" in unicode(e): + showWarning(_("""\ +Invalid file. Please run a DB check in Anki 1.2 and try again.""")) + else: + msg = _("Import failed.\n") + msg += unicode(traceback.format_exc(), "ascii", "replace") + showText(msg) else: showText("\n".join(importer.log)) finally: