From e218836d3b36a0d2ecf34d0692d9aeb6a6c942ae Mon Sep 17 00:00:00 2001 From: Jarret Dyrbye Date: Mon, 2 Sep 2019 15:29:56 -0600 Subject: [PATCH] pylightning - allow unicode symbols in the description to be passed as-is to the daemon addresses issue #2753. Formatting the JSON with the default parameters will escape the unicode symbols in a way that c-lightning won't allow, leading to an exception. --- contrib/pylightning/lightning/lightning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pylightning/lightning/lightning.py b/contrib/pylightning/lightning/lightning.py index 8eb99b22e275..42aa86fceeb5 100644 --- a/contrib/pylightning/lightning/lightning.py +++ b/contrib/pylightning/lightning/lightning.py @@ -169,7 +169,7 @@ def __init__(self, socket_path, executor=None, logger=logging, encoder_cls=json. self.next_id = 0 def _writeobj(self, sock, obj): - s = json.dumps(obj, cls=self.encoder_cls) + s = json.dumps(obj, ensure_ascii=False, cls=self.encoder_cls) sock.sendall(bytearray(s, 'UTF-8')) def _readobj(self, sock, buff=b''):