stomp_ws_py
stomp_ws_py copied to clipboard
Error If frame data contains a colon (:)
2023-11-10 08:56:41,271 - ERROR - error from callback <bound method Client._on_message of <stomp_ws.client.Client object at 0x7f910537ce50>>: too many values to unpack (expected 2)
This line in frame.py: (key, value) = lines[i].split(':')
Just needs adjusting to account for the case of value containing a colon, e.g. key_and_val = lines[i].split(':',2) headers[key_and_val[0]] = key_and_val[1]
# get all headers
i = 1
while lines[i] != "":
# get key, value from raw header
(key, value) = lines[i].split(":", 1)
headers[key] = value
i += 1