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 (retired) Inheritance __str__

Hannah Dickey
Hannah Dickey
5,986 Points

No module named 'Monster'?

I can't seem to figure out what is wrong with my code please help!

Here is my code https://w.trhou.se/ddpoplkqus

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I took the liberty of forking your workspace and attempted to run monster.py. What I'm receiving is a TabError for inconsistent uses of tabs and spaces for indentation. Most other languages don't care much about tabs vs spaces, but this is not the case with Python. You must remain consistent with indentation throughout the file. So whichever you pick, you need to use that spacing for indentation everywhere.

My suggestion: Go back through your code and remove all indentation and then go through and start putting it back using the same indentation throughout.

Hope this helps! :sparkles: