error in python view