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)