Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Object-Oriented Python Instant Objects Method Interactivity

Ingrid Matthews
Ingrid Matthews
1,465 Points

What does this mean in the context of my code: "argument of the type NoneType is not iterable"? Thanks!

I appreciate the help I've gotten so far. Here's a new error msg and I'm still stuck...

class Student:
    name = "Your Name"

    def praise(self):
        return "You inspire me, {}".format(self.name)

    def reassurance(self):
        return "Chin up, {}. You'll get it next time!".format(self.name)

    def feedback(self, grade):
        if int(grade) > 50:
Eldin Guzin
Eldin Guzin
6,010 Points

"argument of type 'NoneType' is not iterable". That message probably refers to a loop or membership operator, but I don't see either in this code.Anyways you dont have a "grade" variable set in the first place and keep in mind you need to make it iterable, and also you need to set it before the functions

1 Answer

Steven Parker
Steven Parker
229,921 Points

You're pretty close, but the instructions asked that you "return the result of the [selected] method."
Right now, the correct method is being called, but the result is not being returned.

The confusing error message apparently relates to something done in the internal testing that we never see.