Hi,
I want to test the subscribe data function. I can successfully get EA work, but when I execute my subscriber in python script, it doesn't show anything, when I pass the parameter zmq.NOBLOCK to the socket.recv(), it gives me the error: zmq.error.again: Resource temporarily unavailable.
I write the simplest code of subscriber in a single python script to check the rightness. I also test the zmq pub sub mode seperately only in python. It works.
Hi, I want to test the subscribe data function. I can successfully get EA work, but when I execute my subscriber in python script, it doesn't show anything, when I pass the parameter zmq.NOBLOCK to the socket.recv(), it gives me the error: zmq.error.again: Resource temporarily unavailable. I write the simplest code of subscriber in a single python script to check the rightness. I also test the zmq pub sub mode seperately only in python. It works.
import sys import zmq port = "5576" context = zmq.Context() socket = context.socket(zmq.SUB) socket.connect ("tcp://localhost:5576") socket.setsockopt_string(zmq.SUBSCRIBE,"EURUSD") string = socket.recv(zmq.NOBLOCK) print(string)
Does anyone know why? Thanks!