janclemenslab / das

Deep Audio Segmenter
http://janclemenslab.org/das/
Apache License 2.0
28 stars 10 forks source link

"Waveform and spectrogram display parameters" tab stops working and throws error #79

Open avakiai opened 3 weeks ago

avakiai commented 3 weeks ago

Hi Jan,

While annotating some data in the das gui I was occasionally changing the parameters under View > "VIdeo, waveform, and spectrogram display parameters". I noticed that sometimes, after having changed things a few times in an open file, I'm no longer able to get that window to open. Clicking on the tab results in the following error in the terminal:

Traceback (most recent call last):
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/xarray_behave/gui/app.py", line 1936, in <lambda>
    menuitem.triggered.connect(lambda: callback(qt_keycode))
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/xarray_behave/gui/app.py", line 2131, in set_spec_freq
    dialog = view_dialog.Form(parent=self, model=self)
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/xarray_behave/gui/view_dialog.py", line 191, in __init__
    TextSlider(
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/xarray_behave/gui/view_dialog.py", line 60, in __init__
    self.initUI()
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/xarray_behave/gui/view_dialog.py", line 96, in initUI
    self.sld.setValue(self.value)
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/superqt/sliders/_labeled.py", line 51, in setValue
    self._slider.setValue(value)
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/superqt/sliders/_generic_slider.py", line 115, in setValue
    value = self._bound(value)
  File "/gs/home/kiaia/.conda/envs/das_forge/lib/python3.10/site-packages/superqt/sliders/_generic_slider.py", line 338, in _bound
    return self._type_cast(max(self._minimum, min(self._maximum, value)))
TypeError: '<' not supported between instances of 'tuple' and 'float'

This comes after install of the conda-forge version of DAS.

das                       0.32.4                  py310_0    ncb
...
superqt                   0.6.7              pyh9208f05_0    conda-forge
...
xarray-behave             0.35.7                  py310_0    ncb