From 6eda0f095da9df1f0a1acf1995a7629df279df77 Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Wed, 18 Apr 2018 14:51:23 +0200
Subject: [PATCH] [algorithm] Read and decode from file before loading json

---
 beat/backend/python/algorithm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py
index 9e33b58..b12b6de 100755
--- a/beat/backend/python/algorithm.py
+++ b/beat/backend/python/algorithm.py
@@ -356,7 +356,7 @@ class Algorithm(object):
             return
 
         with open(json_path, 'rb') as f:
-            self.data = simplejson.load(f)
+            self.data = simplejson.loads(f.read().decode('utf-8'))
 
         self.code_path = self.storage.code.path
         self.code = self.storage.code.load()
-- 
GitLab