'NoneType' object has no attribute 'setdefault' code example Example: 'NoneType' object has no attribute 'attname' super().__init__(*args, **kwargs)