pls correction with correct syntax pythoh piece of Code that cause error:
def reliable_send(self, data):
json_data = json.dumps(data)
self.connection.send(json_data)
Error is:
self.connection.send(json_data) at json_data whic is
TypeError: a bytes-like object is required, not 'str'