From b91765d46242a973d970514c1bb88caed04a386b Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 22 Oct 2013 16:53:10 +0000 Subject: [PATCH] 7150: crash on backup or export svn: r23367 --- gramps/gui/viewmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 952869dda..0331dcd89 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -1304,7 +1304,8 @@ class ViewManager(CLIManager): basefile = file_entry.get_text() basefile = basefile.replace("/", r"-") filename = os.path.join(path_entry.get_text(), basefile) - filename = filename.encode(glocale.getfilesystemencoding()) + if sys.version_info[0] < 3: + filename = filename.encode(glocale.getfilesystemencoding()) if os.path.exists(filename): sfilename = get_unicode_path_from_env_var(filename) question = QuestionDialog2(