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

Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated in raytrace demo #129

Closed
nbecker opened this issue May 10, 2023 · 8 comments · Fixed by #145

Comments

@nbecker
Copy link
Contributor

nbecker commented May 10, 2023

In raytrace demo, running on local gpu (not colab), when executing scene.preview(), I get

[Open Browser Console for more detailed log - Double click to close this message]
Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated
1233/e/<@http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.75bff6c5b3e16e2f7d65.js?v=75bff6c5b3e16e2f7d65:1:32036

Here is a screenshot
sionna-raytrace-error

@merlinND
Copy link
Collaborator

Hello @nbecker,

Could you please try the solution proposed in this comment and let us know if it worked for you?
#106 (comment)

@rsubbaraman
Copy link
Contributor

Hi @merlinND

I tried the solution in #106 on my bare-metal Ubuntu machine, and it did not fix the problem.

Some details:
Ubuntu 20.04, Python 3.8.10

ipydatawidgets                    4.3.3
ipykernel                        6.21.2
ipython                          7.34.0
ipywidgets                        8.0.4
jupyter                           1.0.0
jupyter-core                      5.2.0
jupyterlab                        3.6.1
jupyterlab-widgets                3.0.5
jupyter-contrib-nbextensions      0.7.0
notebook                          6.5.2 
pythreejs                         2.4.2

@rsubbaraman
Copy link
Contributor

I tried the default docker image and I can reproduce the problem in this issue while trying to call scene.preview().

@merlinND
Copy link
Collaborator

merlinND commented Jun 8, 2023

Hi @rsubbaraman,

That's strange, I am using these exact same package versions and the preview is working well. Just to check,

  • Could you please try with Python 3.10?
  • Are you using Jupyterlab or plain Jupyter notebooks?

@rsubbaraman
Copy link
Contributor

@merlinND Jupyterlab was a good suggestion. Thank you

It's now working natively on my system!

image

The Jupiter notebook running on the Docker build still has the problem. I'll see if I can modify it and fix it.

@merlinND
Copy link
Collaborator

merlinND commented Jun 8, 2023

Thank you for reporting back! My understanding was that Jupyter notebooks had been deprecated in favor of Jupyterlab by the Jupyter team, but it looks like they have reverted that decision.
There may be a specific combination that that works around this bug for classic notebooks, but I'm not sure which.

@rsubbaraman
Copy link
Contributor

rsubbaraman commented Jun 8, 2023

@merlinND

I figured out the suspects:

  1. jupyterlab-widgets: Bumping version beyond 3.0.5 causes the original error faced by @nbecker. v3.0.5 works.
  2. ipydatawidgets: Version 4.3.3 has issues with pythreejs: #57 at ipydatawidgets

The DOCKERFILE updates jupyter (which breaks jupyterlab-widgets). In addition, the jupyter notebook does not work for any combination of things that I've tried.

I will submit a PR to fix this problem.

@merlinND
Copy link
Collaborator

Thanks for the investigation @rsubbaraman!

Following @moorepants' commit, it turns out we can get pythreejs working in both classic notebook and jupyterlab with the two pins:

jupyterlab-widgets==3.0.5
widgetsnbextension==3.6.1

I've used the latest current versions for the rest of the modules (including ipywidgets==8.0.6 and ipydatawidgets==4.3.5).

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

Successfully merging a pull request may close this issue.

3 participants