From 666be79cba71e567692350d1ffb8a8096b88b02d Mon Sep 17 00:00:00 2001
From: Maximilian Moser <maximilian.moser@tuwien.ac.at>
Date: Thu, 22 Feb 2024 14:43:16 +0100
Subject: [PATCH] Fix loading of pickle results

---
 formatscaper/core/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/formatscaper/core/utils.py b/formatscaper/core/utils.py
index 44b0f33..4742385 100644
--- a/formatscaper/core/utils.py
+++ b/formatscaper/core/utils.py
@@ -108,7 +108,8 @@ def load_results(
 
     raw_results = []
     if file_format == "pickle":
-        raw_results = pickle.load(file_name)
+        with open(file_name, "rb") as results_file:
+            raw_results = pickle.load(results_file)
     elif file_format == "yaml":
         with open(file_name, "r") as results_file:
             raw_results = yaml.safe_load(results_file)
-- 
GitLab