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 (2016, retired 2019) Dungeon Game Movement

Benjamin Guyton
Benjamin Guyton
6,858 Points

TypeError: None type object is not iterable

My code looks exactly as Kenneth's does, yet I'm getting an error for line 52 of my code: monster, door, player = get_locations()

Ive never seen this error before, and I dont know what to change to get it to run.
Help please

Steven Parker
Steven Parker
231,236 Points

Please show your code (with formatting), or even better, make a snapshot of your workspace and post the link to it here.

Benjamin Guyton
Benjamin Guyton
6,858 Points

https://w.trhou.se/po6n0lia4o

Here's my snapshot, I appreciate the help.

1 Answer

Steven Parker
Steven Parker
231,236 Points

It doesn't quite look exactly the same.... :wink:

On line 25, there should be a "return" in front of the call to random.sample.

Also, while not related to your question, it looks like there are missing parentheses after "upper" on line 61.