Hi I’m using Confluent kafka with Python and i’m testing the rabbitMqtt connector. A data producer write on a Rabbit queue and with the connector it writes data on a kafka topic. When a consumer must be read the kafka topic I receive the error:
Traceback (most recent call last): File "./temp_consumer.py", line 84, in <module> data = json.loads(record_value) File "/usr/lib/python3.8/json/_init_.py", line 343, in loads s = s.decode(detect_encoding(s), 'surrogatepass') File "/usr/lib/python3.8/encodings/utf_32_be.py", line 11, in decode return codecs.utf_32_be_decode(input, errors, True) UnicodeDecodeError: 'utf-32-be' codec can't decode bytes in position 4-7: code point not in range(0x110000)
The error seems to be generated from a json.decode:
record_value = json.dump(temp_data)
the record value before the decode is:
b'\x00\x00\x00\x00\x02{"id": 15, "body": "4.8", "timestamp": "2021-03-21 01:00:00"}'
Can someone help me?
Thans.