weas-widget icon indicating copy to clipboard operation
weas-widget copied to clipboard

Does not work in colab

Open vladislavivanistsev opened this issue 4 months ago • 3 comments

I installed weas-widget in colab as: !pip install weas-widget

Then run: from ase.build import molecule from weas_widget import WeasWidget atoms = molecule("H2O") viewer = WeasWidget() viewer.from_ase(atoms) viewer

Output:

ValueError Traceback (most recent call last)

in <cell line: 5>() 3 atoms = molecule("H2O") 4 viewer = WeasWidget() ----> 5 viewer.from_ase(atoms) 6 viewer

14 frames

/usr/local/lib/python3.10/dist-packages/ipykernel/jsonutil.py in json_clean(obj) 149 150 # we don't understand it, it's probably an unserializable object --> 151 raise ValueError("Can't clean for JSON: %r" % obj)

ValueError: Can't clean for JSON: array([[ 0. , 0. , 0.119262], [ 0. , 0.763239, -0.477047], [ 0. , -0.763239, -0.477047]])

vladislavivanistsev avatar Apr 03 '24 10:04 vladislavivanistsev