[zeromq-dev] PyZMQ w/ 0mq 3.x

Digital Ninja dn1nj4 at gmail.com
Sun Sep 16 16:22:06 CEST 2012


Originally I just did another sudo python setup.py install.  The clean
install fixed it.  Thanks!

On Fri, Sep 14, 2012 at 3:09 PM, MinRK <benjaminrk at gmail.com> wrote:
> How did you install pyzmq with the new libzmq?  If you had previous built
> against 2.2, you may want to do `python setup.py clean` to make sure it's
> rebuilding everything against the new libzmq.
>
>
> On Fri, Sep 14, 2012 at 2:29 AM, Jason . <dn1nj4 at gmail.com> wrote:
>>
>> Hi All,
>>
>> I am looking at migrating from pyzmq with 0mq v2.2 to pyzmq with 0mq
>> 3.x and am having some very basic issues I'm hoping someone can shed
>> some insight into.  For testing, I am looking at the wuserver/wuclient
>> PUB/SUB examples found in the python 0mq guide.
>>
>> With 0mq 2.2 these examples work fine for me.  But when I upgrade to
>> 3.x, the client appears to only receives empty messages.  I am
>> currently running on Ubuntu 12.04.
>>
>> > python -c 'import zmq; print zmq.zmq_version()'
>> 3.2.0
>>
>> The client appears to connect:
>>
>> > netstat -anl
>> tcp        0      0 0.0.0.0:5556            0.0.0.0:*               LISTEN
>> tcp        0      0 127.0.0.1:50695         127.0.0.1:5556
>> ESTABLISHED
>>
>> I added in print messages for both the client and server to show every
>> message sent & received and commented out the post-receive processing:
>>
>> wuserver:
>>      message = "%d %d %d" % (zipcode, temperature, relhumidity)
>>      print 'Sending %s' % message
>>      socket.send(message)
>>
>> wuclient:
>> socket.setsockopt(zmq.SUBSCRIBE,'')
>> ...
>>      print 'Received: -%s-' % string
>>      #zipcode, temperature, relhumidity = string.split()
>>      #total_temp += int(temperature)
>>
>> The server side claims to be sending messages:
>> Sending 86498 -31 49
>> Sending 62351 21 27
>> Sending 30750 68 42
>> Sending 57048 50 50
>> Sending 2616 -72 43
>>
>> And the client receives something, but no idea what:
>> Collecting updates from weather server
>> Received: --
>> Received: --
>> Received: --
>> Received: --
>> Received: --
>>
>> If you have any suggestions, I would greatly appreciate it.
>>
>> Thanks!
>> Jason
>
>



More information about the zeromq-dev mailing list