That error means python was unable to run your code because of syntax. Python uses whitespace to determine what block of code so it must be consistent. This means you probably have a combination of tab characters (\t) and spaces (’ '). While you can’t visually see a difference, there is one.
It looks like you’re using sublime, and if you highlight the entire block of code you’ll be able to see spaces with a dot and tabs with a line. If there is a combination of both, you’ll get this error.
In sublime, you can go to the bottom right click on where it says
Tab Size and select
Indent Using Spaces. Then click on
Tab Size again and select
Convert Indentation to Spaces.