So, I'm writing a script to take a certain dataset, sample it 100 times using different random seeds, completing all these datasets and then getting the mean error. However, whenever I try to run the script I end up with the error OSError: [Errno 24] Too many open files
I don't understand what I can do to fix this (if I should do something in the script or in to the system and what). I'm using Python 3 with macOS Mojave. Anybody has a clue?