Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
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: