Python Debugging and fixing problems

Asked By 0 points N/A Posted on -
qa-featured

Hi all,

I am getting this error in Python; I am beginner so please guide me to solve this error. I think this is kind of syntax error am I correct. I got this error message before running the program. Please help me to find the typing mistake in the program and fix it. How I can fix the mistake in the program? Thanks.

Tabnanny Tokenizing Error

Token Error EOF in multi-line statement

OK

SHARE
Answered By 0 points N/A #188138

Python Debugging and fixing problems

qa-featured

Since you didn't include your script here for checking, I could only tell you about what happened. This error is triggered when you started an open parenthesis, quotation mark, bracket or curly braces and missed it's end part. Missing this part confuses the compiler on where the "end of line (EOL)" is. The image below shows the occurrence of the error with a missing end quotation mark.

This is a sample of an "End of Line" Error

To solve this:

You should check every line of your whole script for unpaired parentheses, brackets, curly braces, quotation marks and others.

Or

Rewrite the whole file while paying extra attention to parts of the lines with quotation marks such as stings.



Useful Bit:

When working with quotes, parenthesis, brackets or curly braces, always type them in pairs and then insert the code in between. This helps in lowering the chances of errors such as this one.

Related Questions