PythonL: invalid syntax file “”, line 1

I had a similar issue. After removing parts of the code to narrow down the problem, I found the root cause.

In my case I was printing an f-string and inside the f-string I had a space in the name of the variable I was calling

var32 = x
print(f"This is a statement {var 23} "

Removing that space fixed the problem.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)