From bcb7c1dc29b6d7a7ec7f28103bec38217d43c6b3 Mon Sep 17 00:00:00 2001 From: "jamo.wu" Date: Mon, 21 Dec 2020 14:04:19 +0800 Subject: [PATCH] [fix bug]-cannot use a str to initialize an array with typecode 'B' --- Xlib/protocol/rq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xlib/protocol/rq.py b/Xlib/protocol/rq.py index 86cb2def..2b19290a 100644 --- a/Xlib/protocol/rq.py +++ b/Xlib/protocol/rq.py @@ -693,7 +693,8 @@ def pack_value(self, value): val = list(val) size = fmt // 8 - a = array(array_unsigned_codes[size], val) + a = array(array_unsigned_codes[size]) + a.frombytes(val.encode()) data = encode_array(a) dlen = len(val)