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
177,537 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
177,537 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.