vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
176 stars 17 forks source link

Python kernel (without sos-python) does not work #328

Closed BoPeng closed 3 years ago

BoPeng commented 3 years ago

image

zoq commented 3 years ago

I can see the same issue using - https://mybinder.org/v2/gh/mlpack/examples/HEAD

/srv/conda/envs/notebook/lib/python3.7/site-packages/sos_notebook/kernel.py:1320: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
  while self.KC.shell_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/srv/conda/envs/notebook/lib/python3.7/site-packages/sos_notebook/kernel.py:1321: RuntimeWarning: coroutine 'ZMQSocketChannel.get_msg' was never awaited
  self.KC.shell_channel.get_msg()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

not only with the python kernel but with any other kernel I tested as well.

BoPeng commented 3 years ago

This may be due to an upgrade of some jupyter packages. I will have to identify which one is the culprit.

bioworkflows commented 3 years ago

The binder image has

jovyan@jupyter-mlpack-2dexamples-2dy4qd1grt:~$ jupyter --version
jupyter core     : 4.7.1
jupyter-notebook : 6.3.0
qtconsole        : not installed
ipython          : 7.27.0
ipykernel        : 5.1.4
jupyter client   : 7.0.2
jupyter lab      : 3.1.11
nbconvert        : 6.0.7
ipywidgets       : 7.6.3
nbformat         : 5.1.3
traitlets        : 5.1.0

According to this post, downgrading jupyter-client to 6.1.12 should work.

bioworkflows commented 3 years ago

https://github.com/jupyter/jupyter_client/pull/623 is the PR that adds async to get_message

BoPeng commented 3 years ago

This is getting complicated because jupyter notebook itself does not work well with the new version of jupyter_client by default.

see https://github.com/jupyter/notebook/issues/6164

zoq commented 3 years ago

Looks like a workaround is to downgrade Pyzmq and jupyter_client. Looks like you are doing some work in the async branch, happy to test it out as well.

BoPeng commented 3 years ago

@zoq I think I have fixed sos-notebook and jupyterlab-sos, could you please test them?

BoPeng commented 3 years ago

It is the async branch.

zoq commented 3 years ago

@BoPeng Awesome works great, tested with the C++, JavaScript and Python3 kernel.

BoPeng commented 3 years ago

Thanks. I have released sos-notebook 0.22.7, and will release a conda-forge version soon.