[IPython-User] qtconsole and async logging
Francesco Biscani
bluescarni@gmail....
Wed Dec 12 09:58:00 CST 2012
Hello,
I'm testing out the qtconsole in IPython 0.13.1 and ran into an issue. I
have a method which returns a Python 3 future after spawning a thread that
does some asynchronous operations over the network. Whenever I enable
logging in my application (using the standard Python logging module), this
background thread is supposed to print to screen some status/info messages
as the operation progresses. This works fine in the text console, but it
fails in qtconsole with messages like:
ERROR:root:Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/zmq/eventloop/zmqstream.py",
line 414, in _run_callback
callback(*args, **kwargs)
File "/usr/lib64/python3.2/site-packages/IPython/zmq/kernelmanager.py",
line 179, in _handle_recv
self.call_handlers(self.session.unserialize(smsg))
File "/usr/lib64/python3.2/site-packages/IPython/zmq/session.py", line
726, in unserialize
raise ValueError("Invalid Signature: %r"%signature)
ValueError: Invalid Signature: b'd6a302ff4e81d62bb5ec4d1e9ed1e340'
ERROR:root:Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/lib64/python3.2/site-packages/zmq/eventloop/zmqstream.py",
line 440, in _handle_events
self._handle_recv()
File "/usr/lib64/python3.2/site-packages/zmq/eventloop/zmqstream.py",
line 472, in _handle_recv
self._run_callback(callback, msg)
File "/usr/lib64/python3.2/site-packages/zmq/eventloop/zmqstream.py",
line 414, in _run_callback
callback(*args, **kwargs)
File "/usr/lib64/python3.2/site-packages/IPython/zmq/kernelmanager.py",
line 179, in _handle_recv
self.call_handlers(self.session.unserialize(smsg))
File "/usr/lib64/python3.2/site-packages/IPython/zmq/session.py", line
726, in unserialize
raise ValueError("Invalid Signature: %r"%signature)
ValueError: Invalid Signature: b'd6a302ff4e81d62bb5ec4d1e9ed1e340'
ERROR:root:Exception in I/O handler for fd <zmq.core.socket.Socket object
at 0x57a57a0>
Here I suspect that the invalid signature
b'1dc95584133b5e09c5b1c98a3c77af7f' comes from part of the logging output
that is supposed to be printed to screen (which is admittedly rather long).
Any hints on what might be going on here? I can try to reduce the test
case, but before embarking into that I was wondering if someone can give me
any pointer :)
Cheers,
Francesco.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121212/40043cf8/attachment-0001.html
More information about the IPython-User
mailing list