diff --git a/src/transformers/models/marian/convert_marian_to_pytorch.py b/src/transformers/models/marian/convert_marian_to_pytorch.py index 0eb17063c2ba77..79afd50955ddd1 100644 --- a/src/transformers/models/marian/convert_marian_to_pytorch.py +++ b/src/transformers/models/marian/convert_marian_to_pytorch.py @@ -677,7 +677,7 @@ def convert(source_dir: Path, dest_dir): def load_yaml(path): import yaml - with open(path) as f: + with open(path, encoding="utf-8") as f: return yaml.load(f, Loader=yaml.BaseLoader)