TraitError in create_jupyter_widget with in Google Colab
When attempting to use the create_jupyter_widget method in a Google Colab notebook, I encountered an error. The code snippet below:
from IPython.display import display
import ipywidgets
from ovito.vis import Viewport
# Assuming viewport is already configured
viewport = Viewport()
widget = viewport.create_jupyter_widget(picking=True)
display(widget)
results in the following TraitError
:
TraitError: The '_orbit_center' trait of a JupyterViewportWidget instance expected a tuple, not the ndarray array([11.26872355, 11.24011785, 11.26146325]).
Upon further investigation, it seems that the viewport.orbit_center
attribute, which might be related to this error, is not settable in the current implementation.
Any insights or workarounds to address this issue would be greatly appreciated.
Google Colab Environment
%%capture
! pip install -U ovito
! pip install -U ipywidgets