oss-slu / Mouser

GNU General Public License v3.0
1 stars 7 forks source link

Deleting an experiment when there is more than one experiment saved causes fatal error #126

Closed aobermiller closed 1 year ago

aobermiller commented 1 year ago

When deleting an experiment with the delete experiment button while there are multiple experiments saved creates an index out of range error. This error causes the program to fatally crash when it the program is closed and then reopened. This error is caused by the created_experiments.csv program.

The delete experiment behavior needs to be modified to not cause this error.

(base) PS C:\Users\adobe\Capstone\Mouser> python .\main.py
Traceback (most recent call last):
  File "C:\Users\adobe\Capstone\Mouser\main.py", line 20, in <module>
    experiments_frame = ExperimentsUI(root, main_frame)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\adobe\Capstone\Mouser\experiment_pages\select_experiment_ui.py", line 41, in __init__
    self.update_frame()
  File "C:\Users\adobe\Capstone\Mouser\experiment_pages\select_experiment_ui.py", line 64, in update_frame
    name = exp[0]
           ~~~^^^
IndexError: list index out of range