-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Failure to initialize default stdout and stderr in the InProcessKernel #724
Comments
I've discovered that the problem is with the I should have made clear from the outset that my code has no problems with ipykernel v5.5. This is purely a v6 issue. |
After a lot of time in the debugger, I now believe that the underlying problem is due to changes in the In
After this, I have renamed the issue accordingly. |
A better fix than in the previous comment is just to add the keyword argument
I will submit a PR with this change. |
I use the in-process kernel in an Jupyter shell embedded in a PyQt GUI. It is based on the QtConsole RichJupyterWidget. Here is a slimmed-down version of the code to set it up.
Calls to the QtConsole FrontendWidget function
_silent_exec_callback
trigger an Empty exception in the Queue module.I haven't been able to diagnose the issue, but the problem appears to be in the following lines in ipykernel InProcessKernelClient function, _dispatch_to_kernel in the following lines:
If I monitor the DummySocket
send_multipart
andrecv_multipart
functions, there is a send and receive pair triggered by lines 2 and 3 above, followed by another send and receive pair triggered by lines 5 and 6, during a couple of successful calls to _dispatch_to_kernel when starting the channels. However, the next call, which hassilent=True
fails because thekernel.dispatch_shell
function doesn't send a message in line 5 so the queue is empty in line 6. I don't know if thesilent
option is the key difference. It might be a problem with using a different handler indispatch_shell
.I am happy to try and extract whatever information is helpful from my debugger, but I don't know enough about the message passing machinery to know what to look for.
The text was updated successfully, but these errors were encountered: