visualization.webrtc_server.enable_webrtc(): "Cannot set WindowSystem. It is already set." in jupyter lab
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### 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)) /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
```markdown
- 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.