args=('latin-1', '[+] Msg from 1248022181 with text: \U0001f4a3 Bomb', 35, 36, 'ordinal not in range(256)') Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/telebot/util.py", line 69, in run task(*args, **kwargs)
File "_Bot.py", line 111, in help print('[+] Msg from %s with text: %s'%(message.from_user.id, m)) UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f4a3' in position 35: ordinal not in range(256) "
Traceback (most recent call last):
File "_Bot.py", line 128, in <module>
bot.polling(none_stop = True) File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 427, in polling self.__threaded_polling(none_stop, interval, timeout)
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 451, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/usr/local/lib/python3.8/dist-packages/telebot/util.py", line 118, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/telebot/util.py", line 69, in run
task(*args, **kwargs)
File "_Bot.py", line 111, in help
print('[+] Msg from %s with text: %s'%(message.from_user.id, m))
UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f4a3' in position 35: ordinal not in range(256)
Что делать? Как исправить ошибку?
Ну, повидимому эта кодовая точка не входит в диапазон кодировки латин1
локаль на сервере какая?
Обсуждают сегодня