I am making a project for a simple experiment. The experiment lets the user input the number of participants. For each participant I have to make a csv, to store some info and open up a custom media player I made with pyt5. Problem is I want the program to continue after closing the window to keep the code running and repeat the process for the rest of the participants so I followed the last answer from this question: How do I execute more code after closing a PyQt window?. My appExec() function looks like this:
# Continues Code After Video player
def appExec(part_now, participants):
global raw_data_name # A Directory
app = QApplication(sys.argv)
window = Window()
window.showMaximized()
app.exec_()
stop(eyetracker)
while part_now < int(participants):
part_now += 1
name = "Participant" + str(part_now)
dir = os.path.join(mp_diretory, name)
os.mkdir(dir)
raw_data_name = str(dir) + '\Raw_Data.csv' # prepei na to do analoga
appExec(part_now, participants)
where part_now is the number of the participant that participates now and participants is the number of total participants in string format. In main I call the following for the programm to work:
sys.exit(appExec(part_now, participants))
The programm does what I want it to but when all participants are done it delayes a bit and then it exits with exit code -1073741819. Does anyone know what does that mean and if it needss fixing? And if It is problematic are there any suggestions?