[IPython-dev] ipython-zmq messages help

Brian Granger ellisonbg@gmail....
Fri Jun 4 09:44:44 CDT 2010


Can you print the message you are receiving by calling recv instead of
recv_json?  If there is a topic, you may be trying to decode the
topic, which won't work.  But let's see what the message is first.

Brian

2010/6/4 Omar Andrés Zapata Mesa <andresete.chaos@gmail.com>:
> hi all.
> what is a valid python json message?
> I am sending string that content dictionaries and in  REQ/REP sockets it
> dont show me error, but in SUB/PUB it show me
> msg=self._subscribe_socket.recv_json()
>   File "_zmq.pyx", line 918, in zmq._zmq.Socket.recv_json (zmq/_zmq.c:6989)
>   File "/usr/lib/python2.6/json/__init__.py", line 307, in loads
>     return _default_decoder.decode(s)
>   File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>   File "/usr/lib/python2.6/json/decoder.py", line 336, in raw_decode
>     obj, end = self._scanner.iterscan(s, **kw).next()
>   File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
>     rval, next_pos = action(m, context)
>   File "/usr/lib/python2.6/json/decoder.py", line 171, in JSONObject
>     raise ValueError(errmsg("Expecting property name", s, end))
> ValueError: Expecting property name: line 1 column 1 (char 1)
> some idea?
> O.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com


More information about the IPython-dev mailing list