shell message.content.payload is ignored (causing IRkernel ?foo/help(foo) to return no result)
See original GitHub issueI’m seeing a funny behavior with IRkernel where ?foo
/ help(foo)
doesn’t return a result. (Convo moved in from https://nteract.slack.com/archives/C4S4H8DN1/p1525387222000158.)
I think the root of the problem is:
- There’s no
output_type: 'display_data'
oroutput_type: 'stream'
msg, like for usual outputs - IRkernel is sending the help result on the
shell
channel inmessage.content.payload[0]
and Hydrogen isn’t looking for messages there (as per https://github.com/nteract/hydrogen/blob/master/lib/kernel.js#L323-L334)
{
"idents": [],
"header": {...},
"parent_header": {...},
"metadata": {},
"content": {
"status": "ok",
"execution_count": 2,
"payload": [
{
"source": "page",
"data": {
"text/html": "No documentation for 'foo' in specified packages and libraries:\nyou could try '??foo'",
"text/latex": "No documentation for 'foo' in specified packages and libraries:\nyou could try '??foo'",
"text/plain": "No documentation for 'foo' in specified packages and libraries:\nyou could try '??foo'"
},
"metadata": {}
}
],
"user_expressions": {}
},
"buffers": []
}
But jupyter console
does manage to find the payload from the ‘shell’ channel, somehow:
$ jupyter console --kernel=ir
In [1]: ?foo
No documentation for 'foo' in specified packages and libraries:
you could try '??foo'
In [2]: help(foo)
No documentation for 'foo' in specified packages and libraries:
you could try '??foo'
Versions:
- Hydrogen 2.4.1
- IRkernel 0.8.11
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just for the record, payloads are deprecated.
If payloads are deprecated, couldn’t irkernel switch the messages from payload to
display_data
orstream
?