Fixing problem with 'NoneType' object has no attribute 'bands'