SyntaxError: invalid string (possibly contains a unicode character)

Probably not the answer, but sometimes if your string is copied from somewhere, and pasted in to the editor, it can get some Unicode characters in it.

It happens to me with apostrophes a lot ( ’ ).

Here is an app to demonstrate a troublesome apostrophe:

https://anvil.works/build#clone:VSNVNJJB3RGVYKT5=C4QD6R5X3UAXIJ64AM4YS7W7

If your string is not big, can you take a guess at which characters are the troublesome ones and just rewrite them?