isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
10.78k stars 2.23k forks source link

visualization.webrtc_server.enable_webrtc(): "Cannot set WindowSystem. It is already set." in jupyter lab #6631

Open smidm opened 5 months ago

smidm commented 5 months ago

Checklist

Describe the issue

I tried to run web visualizer according to https://www.open3d.org/html/tutorial/visualization/web_visualizer.html in a Jupyter lab cell. The same works on the CLI using open3d example visualization/draw_webrtc.

Steps to reproduce the bug

  1. create new python env
  2. pip install -U -f https://www.open3d.org/docs/latest/getting_started.html open3d
  3. pip install jupyterlab
  4. jupyter lab
  5. run following in the jupyter lab:
import open3d as o3d
o3d.visualization.webrtc_server.enable_webrtc()

Error message

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[1], line 2
      1 import open3d as o3d
----> 2 o3d.visualization.webrtc_server.enable_webrtc()

RuntimeError: [Open3D Error] (void open3d::visualization::gui::Application::SetWindowSystem(std::shared_ptr<open3d::visualization::gui::WindowSystem>)) /root/Open3D/cpp/open3d/visualization/gui/Application.cpp:346: Cannot set WindowSystem. It is already set.

Expected behavior

The same as on CLI.

Open3D, Python and System information

- Operating system: Fedora 39
- Python version: 3.9.13
- Open3D version: 0.18.0+0cf605f
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
- Compiler version (if built from source): -

Additional information

running on Wayland

Cipher-zzz commented 1 month ago

Same