From 0ad0068e6c0ac54dc1fb1c4766ba01c9c6764d46 Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 23 Jan 2024 16:02:13 +0100 Subject: [PATCH] Fixed problem opening text file with strange enconding --- odmf/webpage/filemanager/fileactions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odmf/webpage/filemanager/fileactions.py b/odmf/webpage/filemanager/fileactions.py index 98ad408c..06ceff35 100644 --- a/odmf/webpage/filemanager/fileactions.py +++ b/odmf/webpage/filemanager/fileactions.py @@ -83,7 +83,7 @@ def check(self, path: Path): from ...dataimport import ImportDescription try: descr = ImportDescription.from_file(path.absolute) - with path.to_pythonpath().open(encoding=descr.encoding or 'utf-8') as f: + with path.to_pythonpath().open('rb') as f: f.read(100) except IOError: return False