From bafa431b0179b4eb9b24a363f0d13d12ae960788 Mon Sep 17 00:00:00 2001 From: Mijian Xu Date: Mon, 18 Mar 2024 16:54:04 +0800 Subject: [PATCH] Update para.py --- pytomoatt/para.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytomoatt/para.py b/pytomoatt/para.py index daff76d..116cb3f 100644 --- a/pytomoatt/para.py +++ b/pytomoatt/para.py @@ -11,7 +11,7 @@ def __init__(self, fname: str) -> None: :type fname: str """ self.fname = fname - with open(fname) as f: + with open(fname, encoding='utf-8') as f: file_data = f.read() self.input_params = yaml.load(file_data, Loader=yaml.Loader) @@ -32,4 +32,4 @@ def write(self, fname=None): """ if fname is None: fname = self.fname - yaml.dump(self.input_params, fname, Dumper=yaml.Dumper) \ No newline at end of file + yaml.dump(self.input_params, fname, Dumper=yaml.Dumper)