From c84e24fb408aca54f1c3cb36b815a1b5037d3935 Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Wed, 18 Apr 2018 15:02:40 +0200
Subject: [PATCH] [library] Read and decode from file before loading JSON

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

diff --git a/beat/backend/python/library.py b/beat/backend/python/library.py
index 3d062c9..b6f03da 100755
--- a/beat/backend/python/library.py
+++ b/beat/backend/python/library.py
@@ -147,7 +147,7 @@ class Library(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
 
-- 
GitLab