[PYTHON] Syntax Error: invalid syntax due to double-byte space

Error reproduction

print("test")
 

I was angry with Syntax Error: invalid syntax.

Cause

I'm angry because I put a double-byte space on the next line of the print statement.

In markdown and vscode, the red dotted line and red wavy line tell you the existence of double-byte space. I thought that I was getting an error because the syntax in other parts was wrong, so I was only looking at other parts. I didn't notice the double-byte space error because I thought it would occur where something was written, such as print ("test ").

Even if it looks like a blank line, an error will occur if there is a double-byte space there.

Recommended Posts

Syntax Error: invalid syntax due to double-byte space
Error due to conflict between python when using gurobi
[AWS] How to deal with "Invalid codepoint" error in CloudSearch