oss-slu / Mouser

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

126 experiment deletion error #129

Closed aobermiller closed 1 year ago

aobermiller commented 1 year ago

Fixes #126

What was changed?

experiment_pages_ui.py

Why was it changed?

While delete experiments, would overwrite created_experiments.csv would create extra empty lines in the file. This caused errors when other methods tried to read the file. Changed it so they no longer appear.

How was it changed?

open('./database_apis/created_experiments.csv', 'w')

is now

open('./database_apis/created_experiments.csv', 'w', newline="")

Overrides the default newline character with an empty string so that it doesn't create empty lines.

Added a return line so that when there is an OS error in the delete_experiment method it doesn't continue delete the entry in created_experiments.csv

loganwyas commented 1 year ago

@aobermiller What is the progress on this?

aobermiller commented 1 year ago

@loganwyas doing one more test then I'm good to send the pull request