janpfeifer / gonb

GoNB, a Go Notebook Kernel for Jupyter
https://github.com/janpfeifer/gonb
MIT License
467 stars 32 forks source link

Error with `gonbui.RequestInput()`? #81

Closed oderwat closed 6 months ago

oderwat commented 6 months ago

I am sure we used gonbui.RequestInput() before and it worked, now we get an error. I tried to use the exact example from the tutorial an get:

GoNB Error:
A MIMEJupyterInput sent to GONB_PIPE without an associated protocol.InputRequest!?
github.com/janpfeifer/gonb/internal/jpyexec.(*Executor).pollNamedPipeReader
    /Users/anon/go/pkg/mod/github.com/janpfeifer/gonb@v0.9.3/internal/jpyexec/namedpipes.go:187
runtime.goexit
    /usr/local/Cellar/go/1.21.4/libexec/src/runtime/asm_amd64.s:1650

This happens on at least two different systems (both running jupyter lab locally on mac, one intel one m1)

janpfeifer commented 6 months ago

hi Hans, I'm sorry about the issue. Let me see if I can fix it later tonight -- worst case in the weekend.

janpfeifer commented 6 months ago

Fixed, it was a very small silly error.

Unfortunately, I haven't figured out how to create a functional test for RequestInput (or %with_input), because I'm not (easily) able to instrument entering input the headless chrome used when executing test notebooks :( ... so I never noticed I had broken it.

But I manually tested it here, and it's now working. Let me know if it doesn't work for you.

I drafted a new v0.9.4 release, and corresponding docker images in DockHub

janpfeifer commented 6 months ago

Took a little trial & error but now gonbui.RequestInput, %with_inputs and %with_password are properly being tested.

Closing the bug.

oderwat commented 6 months ago

works!