Ignoring an error message to continue with the loop in python [duplicate]
It is generally a bad practice to suppress errors or exceptions without handling them, but this can be easily done like this: try: # block raising an exception except: pass # doing nothing on exception This can obviously be used in any other control statement, such as a loop: for i in xrange(0,960): try: … … Read more