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', {}) diff --git a/tests/exchange/test_server_bundle.py b/tests/exchange/test_server_bundle.py index 50dd98d7..42b2d3f3 100644 --- a/tests/exchange/test_server_bundle.py +++ b/tests/exchange/test_server_bundle.py @@ -51,7 +51,7 @@ class ValidateChunks(object): if data_frequency == 'daily': end = end - pd.Timedelta(hours=23, minutes=59) - print start, end, data_frequency + print(start, end, data_frequency) arrays = reader.load_raw_arrays(self.columns, start, end, [asset.sid, ])