1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

fix issue #403: UnicodeEncodeError when sending a non-ASCII file in Python 2.7

This commit is contained in:
Benny
2018-04-18 15:00:05 +08:00
parent 28111bdf4e
commit 5dd88f8223

View File

@ -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)