From 1318d8c5f880d8930433f4b102a9a833789f3e7c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Jul 2009 15:59:19 +0900 Subject: [PATCH] handle errors with foreign characters --- ankiqt/ui/importing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ankiqt/ui/importing.py b/ankiqt/ui/importing.py index 12a4e0471..cecfa53d4 100644 --- a/ankiqt/ui/importing.py +++ b/ankiqt/ui/importing.py @@ -177,7 +177,7 @@ you can enter it here. Use \\t to represent tab."""), return except Exception, e: msg = _("Import failed.\n") - msg += traceback.format_exc() + msg += unicode(traceback.format_exc(), "ascii", "replace") self.dialog.status.setText(msg) return finally: