Check line 76 of your code for errors. If line 76 is incorrectly formed, Python may see line 77 as a continuation of line 76 and throw the SyntaxError because of that.