From f965e579d7303c9976b59ac5efa2c897c0ba6398 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 24 Apr 2020 11:33:32 +0200 Subject: [PATCH] fix: [abstract] Forces file to be read with utf8 encoding --- pymisp/abstract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymisp/abstract.py b/pymisp/abstract.py index 5df5ffd..dedb635 100644 --- a/pymisp/abstract.py +++ b/pymisp/abstract.py @@ -46,7 +46,7 @@ class MISPFileCache(object): def _load_json(path: Path) -> Union[dict, None]: if not path.exists(): return None - with path.open('r') as f: + with path.open('r', encoding='utf-8') as f: if HAS_RAPIDJSON: data = load(f) else: