Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication could not be established with widget #6

Open
ivvv opened this issue Feb 4, 2020 · 9 comments
Open

Communication could not be established with widget #6

ivvv opened this issue Feb 4, 2020 · 9 comments

Comments

@ivvv
Copy link

ivvv commented Feb 4, 2020

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
Copy link
Author

ivvv commented Feb 4, 2020

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

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

@mattiaswangblad
Copy link
Collaborator

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.

@mattiaswangblad
Copy link
Collaborator

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.

@mattiaswangblad
Copy link
Collaborator

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
Copy link
Author

ivvv commented Feb 4, 2020

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

@ivvv
Copy link
Author

ivvv commented Feb 4, 2020

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

@mattiaswangblad
Copy link
Collaborator

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
Copy link
Author

ivvv commented Feb 4, 2020

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'

@mattiaswangblad
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants