- Notifications
You must be signed in to change notification settings - Fork 193
Closed
jupyter/jupyter_client
#708Description
I believe a recent change in the json serialization within jupyter_client leads to the following error when trying to use OrbitControls in a jupyter notebook.
ValueError: Out of range float values are not JSON compliantThe issue is caused by default values of +/- Inf for some parameters in OrbitControls
This can also be seen in the second cell of the built-in example.
Here is a minimal (non)-working example:
import pythreejs camera = pythreejs.PerspectiveCamera( position=[0.0, 0.0, 6.0], fov=20, aspect=1.35, near=0.001 ) controls = pythreejs.OrbitControls( controlling=camera, # minAzimuthAngle=-1.0, # maxAzimuthAngle=1.0, # maxDistance=1.0, # maxZoom=1 )Removing the commented lines will insert finite values for all parameters that would default to +/- Inf otherwise, after which the serialization works again.
System info:
python --version Python 3.7.10 python -c "import pythreejs; print(pythreejs.version_info)" (2, 3, 0, 'final') jupyter --version Selected Jupyter core packages... IPython : 7.27.0 ipykernel : 6.4.0 ipywidgets : 7.6.5 jupyter_client : 7.0.3 jupyter_core : 4.8.1 jupyter_server : not installed jupyterlab : not installed nbclient : 0.5.4 nbconvert : 6.1.0 nbformat : 5.1.3 notebook : 6.4.4 qtconsole : 5.1.1 traitlets : 5.1.0xelatihy, eneiss, jiangzhongshi, mctrt212, madebyollin and 4 more
Metadata
Metadata
Assignees
Labels
No labels