-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error when send_message is called without buffers #2
Comments
Note the error is actually from here: https://github.com/jupyter-widgets/ipywidgets/blob/4132414e5a4615a78cc6b849824a6df0155b26e9/ipywidgets/widgets/widget.py#L516-L526
|
Hi @ilyabo!
I don't know ipykernel enough to know if it would be possible, and how hard, but akernel is definitely a project where we can experiment with this kind of new behaviors. If it solves real problems, or offer useful new features, sure we can think of contributing to the official Python kernel. Actually I'm happy that you tried it out, because I knew it could solve issues such as the one you are mentioning. Thanks a lot @kylebarron for opening a PR, I need to polish akernel as up to now I was just trying to have something working, and was not expecting someone to use it, but very glad it happened! I'll be off for the next 5 days so don't expect any answer until then. |
Hi @davidbrochart!
It turns out that akernel actually solves the issue with the widget we are building. We can use
await
to call async methods on our widget and the akernel isn't blocked unlike the default one:Do you think there is a chance of these changes being accepted into the default ipykernel?
Our widget calls
self.send(msg)
without passingbuffers
and we are hitting this error:It works just fine if we use
self.send(msg, buffers=[])
instead, but I think akernel should also handlebuffers=None
.Actually,
send_message
in akernel has a mutable default list argument forbuffers
which is problematic. It should probably just have a checkif buffers to is not None
insteadThe text was updated successfully, but these errors were encountered: