carandraug / mRNA-localisation-screening

1 stars 3 forks source link

crashes when outfile already exists #3

Closed jstitlow closed 6 years ago

jstitlow commented 6 years ago

What is the intended behaviour? Skipping it and moving on would be ok, appending the new answer would be more clever.

Traceback (most recent call last):
  File "mRNA-localisation-screening/src/questionnaire.py", line 117, in save_and_next
    raise RuntimeError('file already exists, do not overwrite results')
RuntimeError: file already exists, do not overwrite results
Abort trap: 6
carandraug commented 6 years ago

On 21 August 2018 at 09:54, Josh Titlow notifications@github.com wrote:

What is the intended behaviour? Skipping it and moving on would be ok, appending the new answer would be more clever.

Traceback (most recent call last): File "mRNA-localisation-screening/src/questionnaire.py", line 117, in save_and_next raise RuntimeError('file already exists, do not overwrite results') RuntimeError: file already exists, do not overwrite results Abort trap: 6

Exiting with an error is the intended behaviour so this is working as intended.

You should not be asked with the same image twice (that was part of the requirements discussed). If you reach a point where you are being asked for an image and there's already a file with previous answers, something wrong happened. It's better to fail as soon as possible than continue with something wrong.