Internal server error

Error: argument of type 'NoneType' is not iterable