How To Avoid Runtime Errors In Python