HELP! PsychoPy crashes after a certain number of loops

Hi! I am building an experiment in the psychopy coder. Basically it is three pumps, pumping various liquids at certain times. The code can be found here https://github.com/niblunc/Bev_Task/blob/master/training_task_working.py
I think maybe I am running out of memory? Is there anyway to clear memory while doing the experiment?
I have done similar experiments via the psychopy coder with no issue.
Grace

Hi Grace, this question isn’t answerable with the current level of detail. Try reading this and give it another shot: