From ff8128ae33eb10f118de1680b8c211b96484b83c Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 21 Jun 2018 14:07:00 -0500 Subject: [PATCH] use bytes instead of str when inserting --- onionr/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionr/core.py b/onionr/core.py index bfc72ae7..a665dd55 100644 --- a/onionr/core.py +++ b/onionr/core.py @@ -731,7 +731,7 @@ class Core: metadata['powRandomToken'] = powToken metadata['time'] = str(self._utils.getEpoch()) - payload = json.dumps(metadata) + '\n' + data + payload = json.dumps(metadata).encode() + b'\n' + data retData = self.setData(payload) self.addToBlockDB(retData, selfInsert=True, dataSaved=True)