Запускается бот на хостинге, все файлы в кодировке utf-8, в начале всех файлов указываю ее на всякий случай, использую python 3.5, но все же появляется следующая ошибка:
Traceback (most recent call last):
File "/root/1.4/bot.py", line 1041, in <module>
autonotif()
File "/root/1.4/bot.py", line 225, in autonotif
.format(str(user_id), catalog)).readlines()[0])
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 2: ordinal not in range(128)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/pyTelegramBotAPI-2.3.0-py3.5.egg/telebot/__init__.py", line 222, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "/usr/local/lib/python3.5/dist-packages/pyTelegramBotAPI-2.3.0-py3.5.egg/telebot/__init__.py", line 246, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/usr/local/lib/python3.5/dist-packages/pyTelegramBotAPI-2.3.0-py3.5.egg/telebot/util.py", line 103, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "/usr/local/lib/python3.5/dist-packages/six-1.10.0-py3.5.egg/six.py", line 686, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/pyTelegramBotAPI-2.3.0-py3.5.egg/telebot/util.py", line 54, in run
task(*args, **kwargs)
File "/root/1.4/bot.py", line 362, in main
log('(main) \u0412\u044b\u0431\u0440\u0430\u043d\u043e {0}'.format(message.text))
File "/root/1.4/bot.py", line 71, in log
log_except(log_text, date)
File "/root/1.4/bot.py", line 45, in log_except
print(log_text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-41: ordinal not in range(128)