Skip to content

Commit e54d060

Browse files
committed
send and receive messages as bytes, not objects
1 parent a01f1d4 commit e54d060

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ldm/invoke/dynamic_prompts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def expand_prompts(
100100
for command in commands:
101101
sequence += 1
102102
format = _get_fn_format(outdir, sequence)
103-
parent_conn.send(
104-
command + f' --fnformat="{format}"'
103+
parent_conn.send_bytes(
104+
(command + f' --fnformat="{format}"').encode('utf-8')
105105
)
106106
parent_conn.close()
107107
else:
@@ -133,7 +133,7 @@ def __init__(self, connection: Connection):
133133
def readline(self) -> str:
134134
try:
135135
if len(self.linebuffer) == 0:
136-
message = self.connection.recv()
136+
message = self.connection.recv_bytes().decode('utf-8')
137137
self.linebuffer = message.split("\n")
138138
result = self.linebuffer.pop(0)
139139
return result

0 commit comments

Comments
 (0)