esdc-esac-esa-int/pyesasky

Communication could not be established with widget

Opened this issue · 9 comments

ivvv commented

I am trying to run pyesasky in jupyterlab under python 3.8 :

from pyesasky import ESASkyWidget
esasky = ESASkyWidget()

and I cannot initialise the widget, it reports an error (as in the subject).

I have followed the installation instructions as listed here.

conda install -c conda-forge nodejs
pip install pyesasky 
jupyter labextension install pyesasky
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Next I've followed the suggestion in the error message:

pip install --upgrade pyesasky 
jupyter labextension install pyesasky@latest

But I still cannot initialise the widget. So, how can I resolve the problem?

ivvv commented

Testing it on python 3.7, I got a different error message:

AttributeError: 'IPythonKernel' object has no attribute 'msg_queue'

Hi Ivan,

For the first one try this.

$ jupyter nbextension install --py pyesasky --sys-prefix
$ jupyter nbextension enable --py pyeasky --sys-prefix

We should have updated the cosmos page with this. You can see it on the readme here on Github.

Second error is a bit more confusing. I need to look into this. It has definitely worked on both 3.6 and 3.7 previously.

Could you check which ipykernel you're using for 3.7?
Run:

import ipykernel
ipykernel.version_info

It seems that ipykernel before version 5 is missing msg_queue.

ivvv commented

With python 3.6 worked as expected, following the original instructions as copied in my first message here.

ivvv commented

With the following two lines:

jupyter nbextension install --py pyesasky --sys-prefix
jupyter nbextension enable --py pyeasky --sys-prefix

it worked in python 3.8

Great. I'll make sure it's added to the Cosmos page.
Sorry for the inconvenience.
Could you also just quickly check your ipykernel version in 3.7?

ivvv commented

Regarding the error message in python 3.7, the ipykernel.version is 4.10.0.

Enabling the pyesasky extension, which worked for python 3.8, does not solve the problem in python 3.7. I.e. even after install and enable I still see

AttributeError: 'IPythonKernel' object has no attribute 'msg_queue'

Thanks. Yeah for some reason you have an older kernel for 3.7 then 3.6.
Turns out we have a dependency for ipykernel 5.0.
I'll try make pyESAsky compatible with ipykernel 4.x or add a dependency for 5.0