diff --git a/catalyst/curate/poloniex.py b/catalyst/curate/poloniex.py index 572cd777..2e51e4fb 100644 --- a/catalyst/curate/poloniex.py +++ b/catalyst/curate/poloniex.py @@ -129,7 +129,7 @@ class PoloniexCurator(object): start = str(newstart), end = str(end) ) - print url + print(url) attempts = 0 success = 0 diff --git a/catalyst/exchange/poloniex/poloniex_api.py b/catalyst/exchange/poloniex/poloniex_api.py index 894ba08b..ce0831bc 100644 --- a/catalyst/exchange/poloniex/poloniex_api.py +++ b/catalyst/exchange/poloniex/poloniex_api.py @@ -107,8 +107,9 @@ class Poloniex_api(object): data=post_data, headers=headers, ) - return json.loads( - urlopen(req, context=ssl._create_unverified_context()).read()) + resource = urlopen(req, context=ssl._create_unverified_context()) + content = resource.read().decode('utf-8') + return json.loads(content) def returnticker(self): return self.query('returnTicker', {})