Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Malformed message" errors #73

Closed
jiahao opened this issue Mar 10, 2015 · 4 comments
Closed

"Malformed message" errors #73

jiahao opened this issue Mar 10, 2015 · 4 comments

Comments

@jiahao
Copy link
Contributor

jiahao commented Mar 10, 2015

On ZMQ.jl master, 0.4-dev, IPython 3.0, output to stderr appears to confuse ZMQ and the output to stderr is truncated.

error("foo")

 in depwarn at ./deprecated.jl:40
 in int at deprecated.jl:29
 in print_escaped at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:70
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:83
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:128
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:115
 in print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:191
 in sprint at iostream.jl:229
 in send_ipython at /Users/jiahao/.julia/v0.4/IJulia/src/msg.jl:54
 in execute_request_0x535c5df2 at /Users/jiahao/.julia/v0.4/IJulia/src/execute_request.jl:232
 in eventloop at /Users/jiahao/.julia/v0.4/IJulia/src/IJulia.jl:123
 in anonymous at task.jl:360
WARNING: int(x) is deprecated, use Int(x) instead.
 in depwarn at ./deprecated.jl:40
 in int at deprecated.jl:29
 in print_escaped at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:70
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:83
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:128
 in _print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:115
 in print at /Users/jiahao/.julia/v0.4/JSON/src/JSON.jl:191
 in sprint at iostream.jl:229
 in send_ipython at /Users/jiahao/.julia/v0.4/IJulia/src/msg.jl:54
 in execute_request_0x535c5df2 at /Users/jiahao/.julia/v0.4/IJulia/src/execute_request.jl:232
 in eventloop at /Users/jiahao/.julia/v0.4/IJulia/src/IJulia.jl:123
 in anonymous at task.jl:360
[C 17:16:47.399 NotebookApp] Malformed message: ['pyerr', '<IDS|MSG>', 'stderr', '<IDS|MSG>', 'feea04c1d65f9b1f6282b12bbbf136a2a6bc9908c3e4757ac30e5e1a258dcf46', '{"msg_id":"94e3c624-ac90-4ccc-b4cc-e81d6c23685e","msg_type":"stream","username":"username","session":"48B9A761D5C94295878DAD4BC9605B73"}', '{"msg_id":"40E35F1D8DB447FF9D2E6ABE75647703","msg_type":"execute_request","username":"username","session":"48B9A761D5C94295878DAD4BC9605B73"}', '{}', '{"name":"stderr","data":"WARNING: int(x) is deprecated, use Int(x) instead.\\n"}']
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/IPython/html/base/zmqhandlers.py", line 181, in _on_zmq_reply
        msg = self._reserialize_reply(msg_list, channel=channel)
      File "/Library/Python/2.7/site-packages/IPython/html/base/zmqhandlers.py", line 162, in _reserialize_reply
        msg = self.session.deserialize(msg_list)
      File "/Library/Python/2.7/site-packages/IPython/kernel/zmq/session.py", line 832, in deserialize
        raise ValueError("Invalid Signature: %r" % signature)
    ValueError: Invalid Signature: 'stderr'
[C 17:16:47.466 NotebookApp] Malformed message: ['3302ffca83da7fa7bd2463e6da1456705730662c113d8599044157df95ea3ef1', '{"msg_id":"2ce39c5d-9700-4375-8ff8-61c4dd70a2fe","msg_type":"pyerr","username":"username","session":"48B9A761D5C94295878DAD4BC9605B73"}', '{"msg_id":"40E35F1D8DB447FF9D2E6ABE75647703","msg_type":"execute_request","username":"username","session":"48B9A761D5C94295878DAD4BC9605B73"}', '{}', '{"traceback":["LoadError: foo\\nwhile loading In[1], in expression starting on line 1",""," in error at error.jl:19"],"ename":"LoadError","evalue":"LoadError: foo\\nwhile loading In[1], in expression starting on line 1","execution_count":1}']
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/IPython/html/base/zmqhandlers.py", line 181, in _on_zmq_reply
        msg = self._reserialize_reply(msg_list, channel=channel)
      File "/Library/Python/2.7/site-packages/IPython/html/base/zmqhandlers.py", line 161, in _reserialize_reply
        idents, msg_list = self.session.feed_identities(msg_list)
      File "/Library/Python/2.7/site-packages/IPython/kernel/zmq/session.py", line 756, in feed_identities
        idx = msg_list.index(DELIM)
    ValueError: '<IDS|MSG>' is not in list

@skariel any ideas?

@skariel
Copy link
Contributor

skariel commented Mar 10, 2015

can't reproduce, it works fine with my setup which is IPython 3.0 and one of the latest Julia nightlies...

@jiahao
Copy link
Contributor Author

jiahao commented Mar 11, 2015

My build has the small case conversion functions deprecated. I wonder if the deprecation warnings in JSON.jl are confusing ZMQ.

@skariel
Copy link
Contributor

skariel commented Mar 11, 2015

Sounds easy to check, what happens if you remove these warnings?

@JamesWrigley
Copy link
Member

I'm gonna close this because I cannot reproduce it on the current IJulia/ZMQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants