You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the combobox for training channel selection is initialized with no options (corresponds to index=-1)
navigating to training will populate the combobox based on the CSVs generated by curation (and combo changes to index=0). This will emit an index changed signal, which is what we want since we need to update the model state based on the currently selected channel.
However, if you navigate back to training after the combobox has already been populated, the combobox will reload (which means clearing itself and repopulating based on the selected csv directory). Upon clearing itself, the index will change to -1 automatically, which will emit an index changed signal.
For some reason, we were listening the currentTextChanged signal instead of the currentIndexChanged signal, so when the index changed to -1, we would get the current text (which was an empty string), and try to convert it to an int to save in the model. This is where the error pops up.
Note: this also means that you get the same error when you change the csv directory on the training UI.
Solution
listen to the currentIndexChanged signal instead of currentTextChanged
wire the signal to a handler that can handle index=-1 properly
Investigate and fix bug that causes
invalid literal for int() with base 10: ''
to appear when navigating tabs. Issue found by @thao-doThe text was updated successfully, but these errors were encountered: