0

Possible Duplicate:
python: SyntaxError: EOL while scanning string literal

I sometime get this error when reading a text file

SyntaxError: EOL while scanning string literal

What does it mean and how can I fix it?

Community
  • 1
  • 1
Bob
  • 10,741
  • 27
  • 89
  • 143

1 Answers1

2

EOL means "End Of Line"

You forgot to close quotation marks of the type "stuff" or 'stuff'

like

>>> print "hello
  File "<stdin>", line 1
    print "hello
               ^
SyntaxError: EOL while scanning string literal
>>> print "hello"
hello

The caret points to where the problem is

Lucas
  • 1,869
  • 4
  • 20
  • 36