mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
more friendly anki 1 import error
This commit is contained in:
parent
e5f3d0b7f0
commit
d99b707d67
1 changed files with 7 additions and 3 deletions
|
@ -282,6 +282,10 @@ def onImport(mw):
|
||||||
try:
|
try:
|
||||||
importer.run()
|
importer.run()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
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 = _("Import failed.\n")
|
||||||
msg += unicode(traceback.format_exc(), "ascii", "replace")
|
msg += unicode(traceback.format_exc(), "ascii", "replace")
|
||||||
showText(msg)
|
showText(msg)
|
||||||
|
|
Loading…
Reference in a new issue