From 6026502b34910cd6dbcf2c6780d7c99cb0796add Mon Sep 17 00:00:00 2001 From: "T. E. Pickering" Date: Mon, 23 Feb 2026 10:29:31 -0700 Subject: [PATCH] Fix KStars disconnecting on large BLOB transfers (issue #35) base64.b64encode() produces a single unbroken line, which causes KStars to close the connection when receiving large BLOBs. Switch to base64.encodebytes() which inserts newlines every 76 characters, matching the line-wrapped base64 that KStars expects. Fixes #35 Co-Authored-By: Claude Sonnet 4.6 --- pyindi/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyindi/device.py b/pyindi/device.py index f7ca951..fa3c6e1 100644 --- a/pyindi/device.py +++ b/pyindi/device.py @@ -761,7 +761,7 @@ def value(self) -> str: b64data = "" else: try: - b64data = base64.b64encode(self.data).decode() + b64data = base64.encodebytes(self.data).decode() except TypeError: b64data = "" logging.warning(f"Could not convert {type(self.data)} to base64")