Zdravim. Asi som sa trosku dost zaplietol s json.
Mam x = {"Data1":0,"Data2":"Test String"}
def send_array_and_str(socket, data, flags=0):
socket.send_json(data, flags | zmq.SNDMORE)
return socket.send(data, flags)
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:5667")
time.sleep(0.2)
my_ndarray = GUI_ARRAY
while True:
print('Now sent')
send_array_and_str(socket, my_ndarray)
time.sleep(1)
Ale hadze mi to chybu
TypeError: {'Data1': 0, 'Data2': 'Test String'} does not provide a buffer interface.
Preco sa to deje?