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!
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
Converting existing tabs to spaces IndentationError: unindent does not match any outer indentation level
Hello all. Not sure if this is legal here but I figured I would give it a try.
in the workspace, I somehow used a mixture of Tabs and Spaces in my code. It was driving me absolutely bonkers because nothing would work. Running the code would either give me the IndentationError or the TabError. When I searched the forums the only answer I could find was that I would have to go back and manually change all existing tabs to spaces. This did not seem optimal. after a quick search, I found this site and it saved my entire evening. Now I don't know if I am allowed to throw other sites on here but let's give it a shot.
Steven Parker227,167 Points
A reputable 3rd party site shouldn't be a problem, but a sketchy one might. I can't view your code because I get an authenticity verification failure from my browser.
Also, you've posted this in "General" instead of a language group. But I'm going to guess your program is in Python, and one of the rules of Python is that you may use tabs or spaces, but not both in the same program. So you'll just need to convert to one or the other (I recommend spaces) and use it consistently.
You can edit the question and move it to the appropriate group if you want.