brainglobe / brainglobe/brainrender

[BUG] `tests/test_ruler.py::test_ruler_from_surface` fails on VTK 9.7.0

Open
#470 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
670
Forks
106
Avg merge
6d 20h
Merged PRs (30d)
3

Description

**Describe the bug**
`tests/test_ruler.py::test_ruler_from_surface` fails on VTK 9.7.0 with `IndexError: index 0 is out of bounds for axis 0 with size 0` at `brainrender/actors/ruler.py:110`.

This works with `vtk<9.7.0` but fails when you update the version.

May be related to: [vtk#20054](https://gitlab.kitware.com/vtk/vtk/-/work_items/20054)

**To Reproduce**
Run `pytest tests/test_ruler.py` in a fresh environment with `vtk>=9.7.0`.

**Expected behaviour**
The test should pass, and a ruler should be generated to the surface.

**Additional context**
Pinning `vtk<9.7.0` temporarily while this is resolved upstream.

Contributor guide

Open the contributing guide

Research direction

Start by running pytest tests/test_ruler.py in a fresh environment with VTK >=9.7.0, then inspect tests/test_ruler.py::test_ruler_from_surface and brainrender/actors/ruler.py around line 110. The work is done when the test passes and a ruler is generated to the surface without pinning VTK below 9.7.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.