For SPYDER users: I'm using spyder 3.3.2 with python 3.7.1 and I solved this, setting indentation to use tabs, with the following steps, click on:
Then I reset the "unidented" line using tab key.
For some reason, without this setting, I got the ghost IndentationError sometimes.