sleap
sleap copied to clipboard
`KeyError` when creating suggestions on "current video"
Bug description
In the Labeling Suggestions dialog, when attempting to generate suggestions on the "current video" (as opposed to "all videos"), the suggestions are never returned and we see a KeyError in the terminal.
Expected behaviour
Suggestions are returned on the current video.
Actual behaviour
Suggestions are never returned and the user is left waiting with no notification of the error.
Your personal set up
- OS: windows 10
- Version(s): SLEAP v1.2.8, python 3.7
- SLEAP installation method (listed here):
- [ ] Conda from package
- [x] Conda from source
- [ ] pip package
- [ ] M1 Macs
Environment packages
# paste output of `pip freeze` or `conda list` here
Logs
Traceback (most recent call last):
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\app.py", line 896, in wrapped_function
action(*args)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\commands.py", line 558, in generateSuggestions
self.execute(GenerateSuggestions, **params)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\commands.py", line 240, in execute
command().execute(context=self, params=kwargs)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\commands.py", line 137, in execute
self.do_with_signal(context, params)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\commands.py", line 161, in do_with_signal
cls.do_action(context, params)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\commands.py", line 2417, in do_action
labels=context.labels, params=params
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\suggestions.py", line 67, in suggest
return method_functions[method](labels=labels, **params)
File "d:\sleap-estimates-animal-poses\other\sleap_v127\sleap\sleap\gui\suggestions.py", line 88, in basic_sample_suggestion_method
sugg_idx_dict[sugg.video].append(sugg.frame_idx)
KeyError: Video(backend=MediaVideo(filename='D:/data/MiniCam/220907_172146/Camera0/mov.00009.active.mp4', grayscale=True, bgr=True, dataset='', input_format=''))
Screenshots
How to reproduce
- Go to Labeling Suggestions
- Select target: "current video"
- Click "Generate Suggestions"
- See error