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

deja vu: nglview widget does not appear #718

Closed
davidlmobley opened this issue Nov 21, 2017 · 11 comments
Closed

deja vu: nglview widget does not appear #718

davidlmobley opened this issue Nov 21, 2017 · 11 comments

Comments

@davidlmobley
Copy link

I'm having a repeat of a past issue -- my nglview widget is not appearing (echoing #599 ). I had it working for a while, but on a new computer with a clean conda install, well, it's just not showing up.

I'm using the minimal example from the main README.md; version info and etcetera in attached screenshot. Any advice?

nglview

@davidlmobley
Copy link
Author

(Note, I HAVE enabled the relevant extension(s), jupyter-nbextension enable --py --sys-prefix widgetsnbextension and jupyter-nbextension enable nglview --py --sys-prefix)

It would be really, REALLY nice if the widget were able to provide some information about why it's not displaying rather than just, er, not displaying.

@hainm
Copy link
Collaborator

hainm commented Nov 21, 2017

It would be really, REALLY nice if the widget were able to provide some information about why it's not displaying rather than just, er, not displaying.

hey @davidlmobley, sorry about your trouble. I would love to have nglview giving more detail but that's what from https://github.com/jupyter-widgets/ipywidgets. We have no control with that, and just hope ipywidgets will be much more stable (it's being actually).

For debugging, can you: Right click in your notebook page -> Inspect -> Console and capture the log so I can see the javascript log. see example below:

screen shot 2017-11-21 at 12 53 01 am

@hainm
Copy link
Collaborator

hainm commented Nov 21, 2017

You might want to read debug experience from an user here: https://github.com/SBRG/ssbio/wiki/Troubleshooting#nglviewer-fresh-install-tips

And sorry again, this is what we need to live with until Jupyter (notebook, ipywidgets, ...) ecosystem have more stable API.

@davidlmobley
Copy link
Author

OK, thanks. I've basically tried everything in the debug experience, though I suppose I can repeat it if I have to.

Here's a console log. Not immediately that helpful to me; most of the warning messages seem to concer a Table of Contents (TOC) extension I sometimes use.
log.txt.gz

It's also telling me that ipywidgets is not available, which is perplexing, since import ipywidgets works and I can get the version just fine. Also,

import ipywidgets 
ipywidgets.Text("hello") 

works fine too.

Thanks.

@hainm
Copy link
Collaborator

hainm commented Nov 21, 2017

Class NGLModel not found in module nglview-js-widgets

This mean that the ipywidgets picked up old nglview-js-widgets Javascript package (0.6 version).
The NGLModel only exists in 1.0 version.

So try to find any existing nglview-js-widgets folder and delete them then install nglview again.

- rm -rf ~/.local/share/jupyter/nbextensions/nglview-js-widgets/  # if you have it
- try to find in `$HOME/Library/Jupyter` too

If you run 'jupyter notebook --debug', you will see a series of folders the notebook will looking for. That's good start to find nglview-js-widgets. good luck.

@davidlmobley
Copy link
Author

Thanks. Apparently I did have an nglview-js-widgets lingering somewhere in my Library tree (I'd cleaned everything in the anaconda directory but misssed that one).

Thanks.

@ppxasjsm
Copy link

Thanks @hainm! I did have some files hiding away in $HOME/Library/Jupyter. That did the trick!

@palashd1
Copy link

The following commands worked for me

$jupyter-nbextension enable --py --user widgetsnbextension

$jupyter-nbextension enable --py --user nglview

@mandar5335
Copy link

The following commands worked for me

$jupyter-nbextension enable --py --user widgetsnbextension

$jupyter-nbextension enable --py --user nglview

This worked in my case also, thanks.

@hainm
Copy link
Collaborator

hainm commented Aug 7, 2019 via email

@mandar5335
Copy link

Please always use —sys-prefix instead of —user from now.

On Wed, Aug 7, 2019 at 8:35 AM mandar5335 @.***> wrote: The following commands worked for me $jupyter-nbextension enable --py --user widgetsnbextension $jupyter-nbextension enable --py --user nglview This worked in my case also, thanks. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#718?email_source=notifications&email_token=ABB645PA7OPH4UKJ22UEE6TQDK6SJA5CNFSM4EEVFHUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3YH2FQ#issuecomment-519077142>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB645INTQAFEXT4L4NVLDDQDK6SJANCNFSM4EEVFHUA .

thanks @hainm , will do that. :)

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

5 participants