There are some python 'only' rules stated at the '[Python Gotchas][1]' page. At the beginning they state that: > **By default**, the GDAL and OGR Python bindings **do not raise exceptions** when errors occur. **Instead they return an error value such as None and write an error message to sys.stdout.** So first enable the use of exceptions, by issuing `gdal.UseExceptions()` somewhere in the beginning of your script. And secondly catch if any exceptions and do whatever you want with them (including nothing) gdal.UseExceptions() # Enable errors ... try: band.GetStatisticsts() except RuntimeError: # <- Check first what exception is being thrown pass If you're curious here's a [link][2] from python's wiki where they describe the methods of exception handling. As far as I can tell, using gdal.UseExceptions() will normalize the behaviour of all the methods in the gdal lib, **by making those methods to use the Python Exceptions**. If you really want to ignore all exceptions put the problematic part of your code inside a try/except block eg.: >>> try: print "1" print "2" a = 0 b = 1 c = b/a # <- I just divided by zero. except: print "Everything is ok" # <- but Everything is Ok. # If you really want to be silent replace with pass >>> 1 2 'Nothing to see here' Just be careful, because that way when an exception happens, your script will silently break from the procedure without any indication of what went wrong. Also I want to point a couple of things as well: 1. If you're opt to go that way, you're responsible if your program does. You're choosing to turn a blind eye at any errors that come in your way. 2. If you catch ALL the exceptions, you will also catch the '[KeyboardInterrupt][3]' exception as well. No more `ctrl-c` (if you're inside a try/except block). 3. Your code at some point is encountering a processing error. Since you're not using gdal.UseExceptions() you're experiencing that error as a sys.stdout response. Use a try/except block at that point to plug that hole. [1]: http://trac.osgeo.org/gdal/wiki/PythonGotchas [2]: https://wiki.python.org/moin/HandlingExceptions [3]: http://docs.python.org/2/library/exceptions.html#exceptions.KeyboardInterrupt