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

Python collections - final game

I typed the first half of the game into Workspaces, and tried to run it when the instructor ran his, and got the following error: TypeError: 'NoneType' object is not iterable

on line #56: monster,door,player = get_locations()

2 Answers

I would need to see more Code to be sure but my guess with your limited post is that the function get_locations() is not returning a value.

can you test just the function to see if you get a real value from it?

the normaly error I see here is persons using "Print" at the end of the function vs "return"

You were right. I had neglected to put in the return line in get_locations. Thanks so much!

awesome!