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

fix blocking issue when cell contains ipywidget #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hjliu0206
Copy link

fix blocking issue when cell contains ipywidget

@hjliu0206
Copy link
Author

hjliu0206 commented May 13, 2024

link to the issue : #312

@hjliu0206
Copy link
Author

@blink1073
hi , blink, can you review my merge request ?

@davidbrochart
Copy link
Member

Thanks @hjliu0206 for opening an issue and a PR.
I'm not sure the fix should be here though, but rather upstream in jupyter-client. It seems to me that kernel_client.shell_channel.get_msg(timeout=None) should return the message when it receives it, not after a timeout.

@hjliu0206
Copy link
Author

hjliu0206 commented May 13, 2024

@davidbrochart hello , david, it's nbclient module block and pulls messages from the shell channel while sending messages to shell channel , most of the logic written in the nbclient , I'm not sure how to modify the jupyter client to fix this problem
image
image

@hjliu0206
Copy link
Author

hjliu0206 commented May 13, 2024

@davidbrochart If I make this change in my own company's branch of the project , do you think does there exist any potential problems ?

@davidbrochart
Copy link
Member

@davidbrochart If I make this change in my own company's branch of the project , do you think does there exist any potential problems ?

No, you are free to fork nbclient, but this might not be the best solution.
Maybe @maartenbreddels has ideas about the issue, since he's been involved in the output widget IIRC.

@dleen
Copy link

dleen commented Jul 9, 2024

Changing the code to %matplotlib inline (from %matplotlib widget) allows this example to succeed. So I suspect it is blocking due to some assumption in the widget engine

@hjliu0206
Copy link
Author

Changing the code to %matplotlib inline (from %matplotlib widget) allows this example to succeed. So I suspect it is blocking due to some assumption in the widget engine

@dleen hello, when you replace with %matplotlib inline, just render static image , will not sync widget data to kernel, the bug occured when nbconvert need send widget status data to the kernel , and then pull data from the kernel

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

Successfully merging this pull request may close these issues.

3 participants