Sorry for reviving this post.
When I get this error the program is crashed. Is there a way to set it up in python such that when it come across this issue, it just simply continue the for and try the other parameters for training.