diff --git a/jrnl/util.py b/jrnl/util.py index 946fdb90..49a2b467 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -116,7 +116,7 @@ def load_and_fix_json(json_path): sys.exit(1) def get_text_from_editor(config, template=""): - tmpfile = os.path.join(tempfile.mktemp(prefix="jrnl")) + _, tmpfile = os.path.join(tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt")) with codecs.open(tmpfile, 'w', "utf-8") as f: if template: f.write(template)