Python Forum

Full Version: unicode error message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i got this error message:

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-9: illegal Unicode character

what does the part bytes in position 0-9 refer to?
It's the index illegal characters in your byte object, that can't be decoded with Unicode-escape.

https://docs.python.org/3/library/except...icodeError

Quote:start
The first index of invalid data in object.

end
The index after the last invalid data in object.
i found the problem. the code exceeded 0x010ffff (1114111) and thus was not valid unicode and so it could not be encoded into utf-8.