sock.send(“ok”)
出现TypeError:a bytes-like object is required not ‘str’
采用如下方式处理即可
cmd=“ok”
sock.send(cmd.encode())
a bytes-like object is required not 'str'
最新推荐文章于 2023-12-14 09:26:26 发布

sock.send(“ok”)
出现TypeError:a bytes-like object is required not ‘str’
采用如下方式处理即可
cmd=“ok”
sock.send(cmd.encode())