[Tutor] SyntaxError: unexpected EOF while parsing
Alan Gauld
alan.gauld at btinternet.com
Tue Aug 18 11:31:47 CEST 2015
On 18/08/15 03:23, Nym City via Tutor wrote:
> I would like to know what is the reason and proper solution for the following error:
> SyntaxError: unexpected EOF while parsing.
The reason is that the parser reached the end of the file
while still trying to parse a Python statement.
Usually this is caused by such things as a missing quote
or parenthesis. You usually have to go back a line or two
to see where the problem originates.
If you are commenting out lines at the end of the file its
likely you have commented out a closing paren or quote
somewhere.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list