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

Can not use in JupyterLite #402

Open
sunzhuo opened this issue Apr 30, 2023 · 2 comments
Open

Can not use in JupyterLite #402

sunzhuo opened this issue Apr 30, 2023 · 2 comments

Comments

@sunzhuo
Copy link

sunzhuo commented Apr 30, 2023

I runned folowing cells in JupyterLite:

%pip install pythreejs
from pythreejs import *
from IPython.display import display
from math import pi
# Reduce repo churn for examples with embedded state:
from pythreejs._example_helper import use_example_model_ids
use_example_model_ids()
BoxGeometry(
    width=5,
    height=10,
    depth=15,
    widthSegments=5,
    heightSegments=10,
    depthSegments=15)

And get these error messages:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'PreviewModel' from module 'jupyter-threejs'
Error: No version of module jupyter-threejs is registered
    at f.loadClass (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/134.402424ef4079078b2e0e.js?v=402424ef4079078b2e0e:1:74855)
    at f.loadModelClass (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/150.1a6d6a3a0542a41bec5a.js?v=1a6d6a3a0542a41bec5a:1:10729)
    at f._make_model (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/150.1a6d6a3a0542a41bec5a.js?v=1a6d6a3a0542a41bec5a:1:7517)
    at f.new_model (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/150.1a6d6a3a0542a41bec5a.js?v=1a6d6a3a0542a41bec5a:1:5137)
    at f.handle_comm_open (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/150.1a6d6a3a0542a41bec5a.js?v=1a6d6a3a0542a41bec5a:1:3894)
    at _handleCommOpen (https://jupyterlite.github.io/demo/extensions/@jupyter-widgets/jupyterlab-manager/static/134.402424ef4079078b2e0e.js?v=402424ef4079078b2e0e:1:73392)
    at v._handleCommOpen (https://jupyterlite.github.io/demo/build/6591.94ed352.js:1:28742)
    at async v._handleMessage (https://jupyterlite.github.io/demo/build/6591.94ed352.js:1:30636)
@merlinND
Copy link

Hello @sunzhuo,
This sounds like the same issue as #389.

@Homomorpheus
Copy link

In Jupyterlite, this problem can stem from too few packages being present in the python environment at build time.
Try changing your requirements.txt to the requirements.txt of this project: https://github.com/triadtitans/rigid_body_interactive

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

3 participants