Answer the question
In order to leave comments, you need to log in
Can't handle error 'utf-8' codec can't decode byte 0xfb in position 10: invalid start byte?
Faced such a problem. When running my bot in PyCharm, there were no problems, but when I decided to transfer the bot to the PythonAnywhere host, this error was displayed -
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfb in position 10: invalid start byte.
menu_keyboard = json.dumps(menu_keyboard, ensure_ascii=False).encode('utf-8')
menu_keyboard = str(menu_keyboard.decode('utf-8'))
Answer the question
In order to leave comments, you need to log in
There is a suspicion of a difference in Python 2/3. Check that the same version is being used.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question