Page 1 of 1

nglview widget not working

Posted: Mon Oct 23, 2023 4:36 pm
by ryan_odell1
I am using vasp.6.4.2 on an ubuntu 22.04.3 LTS machine. I am not able to view structures from py4vasp using the jupyter lab tutorial. I installed py4vasp using pip install and I'm using python 3.10.12. I get the error "Error displaying widget" after using my_calc.structure.print(). I can plot DOS data but not the structures. I've tried to revert versions of ipywidgets to 7.7.0 but i've not been able to resolve the issue.

Selected Jupyter core packages...
IPython : 8.15.0
ipykernel : 6.25.2
ipywidgets : 7.7.0
jupyter_client : 8.3.1
jupyter_core : 5.3.2
jupyter_server : 2.7.3
jupyterlab : 4.0.7
nbclient : 0.8.0
nbconvert : 7.8.0
nbformat : 5.9.2
notebook : 7.0.6
qtconsole : 5.4.4
traitlets : 5.10.1

Re: nglview widget not working

Posted: Tue Oct 24, 2023 12:32 pm
by svijay
Thanks for your question - we are aware of this issue (see forum/viewtopic.php?f=2&t=19199 for further details), a quick fix for this problem could be downgrading the version of notebook:

Code: Select all

pip install "notebook<7"

Re: nglview widget not working

Posted: Wed Oct 25, 2023 6:02 pm
by ryan_odell1
I used pip install "notbook<7" and then opened the training with jupyter notebook instead of jupyter lab which then properly displayed the widget. I can't recall if i opened things in notebook before to test whether or not both didn't work but i'm able to view the 3D figures in jupyter notebook now. The widget still does not work when the training is opened using "jupyter lab".

Re: nglview widget not working

Posted: Mon Oct 30, 2023 12:53 pm
by svijay
To fix the issue on jupyter lab, one option is to try downgrading jupyter lab as well.

Code: Select all

pip install "jupyterlab<4"