gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.84k stars 265 forks source link

Broken in jupyter qtconsole #224

Open mackong opened 3 years ago

mackong commented 3 years ago

When start in qtconsole like

jupyter-qtconsole --kernel=gophernotes

Enter pressed, the terminal show following messages:

2020/12/22 19:19:46 Unhandled shell message:  history_request
2020/12/22 19:19:50 Unhandled shell message:  is_complete_request

and statement is not executed.

VERSIONS: jupyter core : 4.7.0 jupyter-notebook : 6.1.5 qtconsole : 4.7.7 ipython : 7.19.0 ipykernel : 5.3.4 jupyter client : 6.1.7 jupyter lab : 2.2.9 nbconvert : 6.0.7 ipywidgets : not installed nbformat : 5.0.8 traitlets : 5.0.5

cosmos72 commented 3 years ago

To be honest, I have never tried jupyter-qtconsole

Thanks for the report and the pull request, I will try jupyter-qtconsole with your fix

cosmos72 commented 3 years ago

After merging your pull request, I added commit df600ce2762cfd38f5bf3f8807395c888c9eabf9 to distinguish between incomplete and invalid input.

I also noticed that jupyter-qtconsole inserts any error after the prompt, then inserts a newline, forcing the user to delete the error with backspaces before entering new input - does it happen to you as well?

mackong commented 3 years ago

Yes, same behaviour here.

Seems it is caused by reply message arrived before error message.

I tried to fix this, but I don't know how to control the order of IOPub channel and Shell channel.