From e4991396594f43efa422f902099a236f47e36087 Mon Sep 17 00:00:00 2001 From: christopher-besch Date: Sun, 19 Dec 2021 09:24:58 +0100 Subject: [PATCH] catching UnicodeDecodeError --- manim_editor/editor/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manim_editor/editor/commands.py b/manim_editor/editor/commands.py index 885f29fd..ebfd2174 100644 --- a/manim_editor/editor/commands.py +++ b/manim_editor/editor/commands.py @@ -64,6 +64,9 @@ def valid_json_load(path: Path, schema: Any) -> Optional[Any]: except PermissionError: print(f"Warning: can't access file '{path}'") return None + except UnicodeDecodeError: + print(f"Warning: can't decode file '{path}'") + return None try: jsonschema.validate(data, schema) except jsonschema.ValidationError: