PythonL: invalid syntax file “”, line 1

后端 未结 5 2058
太阳男子
太阳男子 2021-02-18 22:14

When doing python3 Webhook.py (this is the file), it gives me the error: File \"\", line 1 (%X - %x) ^ SyntaxError: invalid syntax

5条回答
  •  粉色の甜心
    2021-02-18 22:45

    I just spent 1 hour reviewing my code with the same issue. In my case I started removing parts of the code to narrow down the problem.

    Finally I to the root cause of the problem.

    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 example print(f"This is a statement {Var 23} "

    That space, generated my problem.

    I hope this helps :)

提交回复
热议问题