This error is probably a blank space (visually speaking) but in reality there is something else there that is not really blank. So you have to find out what that space is and eliminate it.
I'm not an expert in Python, but I found this information that seemed very plausible to me:
https://stackoverflow.com/questions/74837978/syntaxerror-invalid-non-printable-character-u00a0-in-python
At first I thought when a script is written by an AI, there could be some kind of invisible trademark of sorts to make AI content easy to detect but then when I used a desktop browser there was no such error. I don't think anyone can help here because it needs to be tested and this is a one time thing. Not a big deal.
Thanks for the replies.