This error for me was caused by the fact that I was trying to use the append function of a list that was not declared yet (or at least the compiler could not see it)
The problem was that the list variable (list = []) in on of my classes was missing a “self” eg self.list = []
