From: Ricardo Garcia Date: Sat, 21 Aug 2010 22:48:55 +0000 (+0200) Subject: Decode the reason given on YouTube errors to avoid crashes (fixes issue #193) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=8e686771af73876f93e44c52dc0dcaf99a56b6f7;p=youtube-dl Decode the reason given on YouTube errors to avoid crashes (fixes issue #193) --- diff --git a/youtube-dl b/youtube-dl index d7b30adca..c850f26b3 100755 --- a/youtube-dl +++ b/youtube-dl @@ -849,7 +849,7 @@ class YoutubeIE(InfoExtractor): return if 'token' not in video_info: if 'reason' in video_info: - self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0]) + self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0].decode('utf-8')) else: self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason') return