When the method is called it is returning AttributeError

You're just setting the variable to a string, not a Person class. This would make a Person with a name of xyz instead.

some_person = Person("xyz")