SyntaxError: invalid string (possibly contains a unicode character)

My understanding is that Client-side code is compiled from (roughly) Python 2.7, not Python 3, therefore the u prefix would be required for any non-ASCII string. Only for Python 3 code is the u unnecessary.

Your Server-side code may be Python 3.

4 Likes