I think continueRoutine=False is a wrong way to build conditional routines, it might easily fail with video, and code that is associated with routine and frame runs instead of being skipped with the routine. That is the reason that if you have video you easily get an OSError associated with OpenGL.
Instead I use a loop where I put conditional into number of loops, which correctly skips or not the routine. That should be the preferred way.
For a more verbose opinion see: Implementing "conditional routines"