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
No known key found for this signature in database
GPG Key ID: 7B84C5D3219A9B31

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)