This repository contains the toolkit to create and proocess the database of seizure and seizure-like data that has been contributed by OpenSeizureDetector users to contribute to research to improve seizure detection algorithms (Open Seizure Toolkit, OSTK).
In the code we have many of the file openning that are done in this model : ` outfile = open(outFilePath, 'w')
dataTime = dateutil.parser.parse(analyser.eventObj['dataTime'])
The problem is that if something is going bad between open and close, the file will never be closed properly.
Using either try except finally of with open(fname) as infile: to resolve that issue.