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

Merge pull request #495 from BennyThink/master

fix issue #403: UnicodeEncodeError when sending a non-ASCII file in Python 2
This commit is contained in:
FrankWang 2018-04-18 20:05:19 +09:00 committed by GitHub
commit 662c2c8797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)