Towers of Hanoi - Attribute Error when following video walkthrough

Hi Codecademy community,

I’m stuck on the Towers of Hanoi project ( I have followed the developer walkthrough, and I believe I am fully synced with it, but I am still having the following issue:

Per Step 20, I am testing my get_input function and getting an AttributeError. Here is my code next to the error:

What am I missing here? I validated that (which I have not changed) contains the get_name method.


Hey y’all,

I gave my code another super close inspection, and I believe I figured out the issue using something I had missed early on in the walkthrough. Hopefully someone smarter than me can confirm, but I believe my error above was actually in Line 10, where I appended a list to the list, as opposed to appending each of my Stacks individually.

I tried both:

stacks += [left_stack, middle_stack, right_stack]

separately instead of what I previously had in Line 10, and either of those appear to work.

And now I can have a beer.


Yes. stacks is a list of stacks. You were originally appending to it another list of stacks, rather than three individual stacks.

For an “graphical” add-on to this script (and a link to a self-solving version) see here.