jupyter
jupyter copied to clipboard
Read websocket frame until completed
Problem
I was trying out emacs-jupyter to connect to Paperspace Gradient using their token authenticated remote kernel. I noticed that some code executions didn't output anything (e.g. .describe()).
Solution
It turns out that the current :on-message handler doesn't properly handle partial messages. If websocket-frame-completep returns nil we should wait for the next frame and accumulate the message.
We also add continuation websocket-frame-opcode as a valid string response. I'm not sure what impact this will have since continuation isn't actually a type like text or binary
Note
For those interested in connecting to Paperspace Gradient; you have to connect WITHOUT using a port. AFAIK emacs-jupyter won't let you set the port to nil in org, so you have to manually override jupyter-tramp-url-from-file-name and set port to nil
https://github.com/emacs-jupyter/jupyter/blob/f97f4b5d8c83e0b901020f835183dde8a2bf649e/jupyter-tramp.el#L282-L289