Index: gc_lang/fr/oxt/DictOptions/LexiconEditor.py ================================================================== --- gc_lang/fr/oxt/DictOptions/LexiconEditor.py +++ gc_lang/fr/oxt/DictOptions/LexiconEditor.py @@ -384,11 +384,11 @@ #if nResult == 1: # lFile = xFilePicker.getSelectedFiles() # lFile = xFilePicker.getFiles() # print(lFile) # workaround - spfImported = os.path.join(os.environ['USERPROFILE'], "fr.personal.json") + spfImported = os.path.join(os.path.expanduser("~"), "fr.personal.json") if os.path.isfile(spfImported): with open(spfImported, "r", encoding="utf-8") as hDst: sJSON = hDst.read() try: sTest = json.loads(sJSON) @@ -422,11 +422,11 @@ self.xNumDic.Label = "0" self.xDateDic.Label = self.dUI.get("void", "#err") def exportDictionary (self): try: - spfExported = os.path.join(os.environ['USERPROFILE'], "fr.personal.json") + spfExported = os.path.join(os.path.expanduser("~"), "fr.personal.json") sJSON = self.xOptionNode.getPropertyValue("personal_dic") if sJSON: with open(spfExported, "w", encoding="utf-8") as hDst: hDst.write(sJSON) sMessage = self.dUI.get('export_message', "#err_msg: %s") % spfExported