From 1ca7ab22a5b84a43f47725b2d043ea9e062c63eb Mon Sep 17 00:00:00 2001 From: v1iclar2 <ivan.clark@ed.ac.uk> Date: Sat, 6 Apr 2024 13:03:55 +0100 Subject: [PATCH] Update file swainlab_parser.py --- src/logfile_parser/swainlab_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logfile_parser/swainlab_parser.py b/src/logfile_parser/swainlab_parser.py index d53779a..b7f49c6 100644 --- a/src/logfile_parser/swainlab_parser.py +++ b/src/logfile_parser/swainlab_parser.py @@ -104,7 +104,7 @@ class HeaderEndNotFound(Exception): def extract_header(filepath: Path): """Extract content of log file before the experiment starts.""" - with (filepath, "r", errors="ignore", encoding = 'unicode_escape') as f: + with open(filepath, "r", errors="ignore", encoding = 'unicode_escape') as f: try: header = "" for _ in range(MAX_NLINES): -- GitLab