Eclipse randomly replacing tabs with spaces
This was originally a comment on the OP, but turned out to be the correct answer, so I'm reposting.
The setting to replace tabs with spaces exists in two places in eclipse:

General > Editors > Text Editors
Pydev > Editor

Both these settings need to be set correctly in order to solve this problem as they can override each other
I'm editing django files in Eclipse Indigo with pydev.  Suddenly in one file, eclipse has decided to start using four spaces instead of tabs.  The file has a .py extension.  It's fine in other files, it's just this one that it's having trouble with.  The settings are correct for using tabs.  I've tried closing and reopening the file, qutting and restarting eclipse, removing all the spaces and reloading the file, but still eclipse insists on using spaces, which is really irritating because eclipse then flags it as an error.
Anyone else experienced this before, and if so, how did you fix it?