From ca76d7271f23311606a7ecffa5d048aa2292532a Mon Sep 17 00:00:00 2001 From: avishaiw Date: Wed, 21 Mar 2018 13:06:14 +0200 Subject: [PATCH] DEV: encoding compatible to unix as well --- catalyst/utils/run_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/utils/run_server.py b/catalyst/utils/run_server.py index 43b782e7..a94dd635 100644 --- a/catalyst/utils/run_server.py +++ b/catalyst/utils/run_server.py @@ -55,7 +55,7 @@ def run_server( if algotext: algotext = base64.b64encode(algotext) else: - algotext = base64.b64encode(algofile.read()) + algotext = base64.b64encode(bytes(algofile.read(), 'utf-8')).decode('utf-8') algofile = None json_file = {'arguments': { @@ -98,6 +98,6 @@ def run_server( if response.status_code == 500: raise Exception("issues with cloud connections, " "unable to run catalyst on the cloud") - recieved_data = response.json() - cloud_log_tail = base64.b64decode(recieved_data["log"]) + received_data = response.json() + cloud_log_tail = base64.b64decode(received_data["log"]) print(cloud_log_tail)