From 28ec491518b2d8e1caa9c9c4c6aa7d68efdf4348 Mon Sep 17 00:00:00 2001 From: daid Date: Fri, 13 Feb 2015 07:00:00 +0100 Subject: [PATCH] Workaround for issue #1136. There is no real fix for unicode in os.path.expanduser for python2 --- Cura/util/profile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 33b7288f..7c11c55d 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -495,7 +495,10 @@ def _getMyDocumentsFolder(): path = os.path.expanduser('~/') if not os.path.exists(path): path = '' - + try: + path = unicode(path) + except UnicodeDecodeError: + path = '' return path setting('sdcard_rootfolder', _getMyDocumentsFolder(), str, 'preference', 'hidden').setLabel(_("Base folder to replicate on SD card"), _("The specified folder will be used as a base path. Any gcode generated from object coming from within that folder will be automatically saved on the SD card at the same sub-folder. Any object coming from outside of this path will save the gcode on the root folder of the card.")) -- 2.30.2