problem running the example
ttsesm opened this issue · comments
Hi,
I am trying to run the example code from the readme file but I am getting the following error:
$ python viewer.py --config downloads/person_1.yaml --viewport 2000,1328 --origin-view
loading pointcloud...
Traceback (most recent call last):
File "viewer.py", line 434, in <module>
my_app = MyApp(args)
File "viewer.py", line 112, in __init__
self.scene_data = load_scene_data(args.config)
File "/home/ttsesm/Development/npbg/npbg/gl/utils.py", line 263, in load_scene_data
pointcloud = import_model3d(fix_relative_path(config['pointcloud'], path))
File "/home/ttsesm/Development/npbg/npbg/gl/utils.py", line 431, in import_model3d
model['rgb'] = data.colors[0][:, :3] / 255.
IndexError: too many indices for array
any idea what could be the cause?
Probably this is caused by the trimesh
version mismatch. Which version do you have?
I got the same problem.
My trimesh is 3.7.13. It was automatically installed by the "install_deps" script.
What's correct version I should install to evaluate this repo?
@ttsesm @bobluoluo please try substituting a line 431 in npbg/utils/gl.py from
model['rgb'] = data.colors[0][:, :3] / 255.
to
model['rgb'] = data.colors[:, :3] / 255.
Please tell us if this helps.
On my side, I had trimesh 3.7.12 installed automatically by the "install_deps" script.
In any case applying @seva100's fix did the trick for me.
Created a PR with the suggested fix.
Thanks @ttsesm! Merged.