From 7ec887e07ac4d6f12bf8399ba05f5bb6c8794a0b Mon Sep 17 00:00:00 2001 From: Jairo Llopis <973709+yajo@users.noreply.github.com> Date: Tue, 16 Jan 2024 07:51:14 +0000 Subject: [PATCH] fix: don't fail in systems with windows 1252 encoding (probably) Fixes https://github.com/copier-org/copier/issues/1186 --- copier/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copier/template.py b/copier/template.py index 06681c307..dacd7a318 100644 --- a/copier/template.py +++ b/copier/template.py @@ -84,7 +84,7 @@ class _Loader(yaml.FullLoader): loader_class=_Loader, base_dir=conf_path.parent ) - with open(conf_path) as f: + with conf_path.open("rb") as f: try: flattened_result = lflatten(yaml.load_all(f, Loader=_Loader)) except yaml.parser.ParserError as e: