From 5dd88f8223f33e0ddf83e4f264bb3c90ed2f26cb Mon Sep 17 00:00:00 2001 From: Benny Date: Wed, 18 Apr 2018 15:00:05 +0800 Subject: [PATCH] fix issue #403: UnicodeEncodeError when sending a non-ASCII file in Python 2.7 --- telebot/apihelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 1173aa3..0bb536c 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -953,7 +953,7 @@ def _convert_input_media(array): def _no_encode(func): def wrapper(key, val): if key == 'filename': - return '{0}={1}'.format(key, val) + return u'{0}={1}'.format(key, val) else: return func(key, val)