isl-org / isl-org/Open3D

open3d.visualization.Visualizer.get_render_option() return NoneType Object

Open
#6,763 1 comment 0 reactions 0 assignees View on GitHub
bug
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 have been trying to reproduce the example `custom_draw_geometry_with_camera_trajectory` in the docs. But, I keep getting error:
AttributeError: 'NoneType' object has no attribute 'load_from_json'

### Steps to reproduce the bug

```python
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
import os

ply_point_cloud = o3d.data.PLYPointCloud()
pcd = o3d.io.read_point_cloud(ply_point_cloud.path)

cus_viz_demo = o3d.data.DemoCustomVisualization()

my_viz = o3d.visualization.Visualizer()
pcd.paint_uniform_color([0.5, 0.5, 0.5])
my_viz.add_geometry(pcd)

my_viz.get_render_option().load_from_json(cus_viz_demo.render_option_path)
```

### Error message

Cell 10 line 5
3 my_viz.add_geometry(pcd)
4 # ro = my_viz.get_render_option()
----> 5 my_viz.get_render_option().load_from_json(cus_viz_demo.render_option_path)

AttributeError: 'NoneType' object has no attribute 'load_from_json'

### Expected behavior

open3d.visualization.RenderOption object should be returned

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.9
- Open3D version: output from python: 0.18
- System architecture: x86
- Is this a remote workstation?: yes
- How did you install Open3D?: pip
- Compiler version (if built from source): gcc 7.5 / clang 7.0
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.