When doing python3 Webhook.py
(this is the file), it gives me the error: File "<fstring>", line 1 (%X - %x) ^ SyntaxError: invalid syntax
I've tried to print out the raw contents of the file and I also used a hex editor, there is nothing on line 1 that should be causing erorrs. I also did: import time, os, aiohttp, plistlib, discord, asyncio, json, subprocess
In the Terminal.app version of Python3 and I had no errors, my version was 3.6.3 but updated to 3.6.5 to check if the issue would go away, which didn't. Can anyone help?
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With