From: Katsunori SUZUI Date: Fri, 13 Jun 2014 09:29:45 +0000 (+0900) Subject: Fix tweepy.API.update_with_madia X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=caf15a92a035dc1ddce4e066662209e2a4d25984;p=tweepy.git Fix tweepy.API.update_with_madia `filename` have to be percent-encoded whichever it is an instance of `unicode` or an instance of `str`. --- diff --git a/tweepy/api.py b/tweepy/api.py index 9218208..43c46e8 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -790,7 +790,8 @@ class API(object): raise TweepError('Invalid file type for image: %s' % file_type) if isinstance(filename, unicode): - filename = urllib.quote(filename.encode("utf-8")) + filename = filename.encode("utf-8") + filename = urllib.quote(filename) BOUNDARY = 'Tw3ePy'