-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 18: ordinal not in range(128) #6769
Comments
Could you post the output of |
[debug] System config: [] header: Date: Sat, 05 Sep 2015 20:35:57 GMT header: Content-Type: text/html header: Transfer-Encoding: chunked header: Connection: close header: Vary: Accept-Encoding header: Set-Cookie: CG=DE:07:Köln; path=/ header: X-Cache-Status: HIT header: Content-Encoding: gzip [AdultSwim] Dumping request to http://www.adultswim.com/videos/rick-and-morty/rick-potion-9/ |
It's due to this
You can yet workaround with python 3. |
Surprisingly enough, it also works with [debug] Python version 2.7.10 - IRIX64-6.5-IP35-mips-n32bit-ELF; I suspect the UTF-8 support in IRIX is just bad enough to not throw that exception. |
No, it should not work in python 2.7.10 (at least that's I can reproduce with Düsseldorf proxy). Do your run it from the same IP? |
Ah, it's actually my internal proxy that's making the difference. While the public IP is the same, I've used the proxy from IRIX, but not from Linux. My squid sends an X-Forwarded-For header with an IP in the 10.0.0.0/8 net. Apparently, adultswim.com takes that as an indicator that I'm from the US: header: Set-Cookie: CG=US:--:--; path=/ |
This issue has been fixed and will be available in the next version. Thanks for the report. |
Confirmed working with youtube-dl 2015.09.09. Thanks! |
Actually, it should not. I forgot to uncomment it. |
You're probably correct. Today, my "location" has changed to something even less correct, but without an umlaut: header: Set-Cookie: CG=DE:07:Frechen; path=/ |
Similar to #5089
youtube-dl --verbose http://www.adultswim.com/videos/rick-and-morty/rick-potion-9/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://www.adultswim.com/videos/rick-and-morty/rick-potion-9/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.09.03
[debug] Python version 2.7.6 - Linux-3.18.2-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4
[debug] Proxy map: {}
[AdultSwim] rick-potion-9: Downloading webpage
[AdultSwim] Rick and Morty - Rick Potion #9 Part 1: Downloading segment information
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/canavan/Desktop/youtube-dl/main.py", line 19, in
File "/home/canavan/Desktop/youtube-dl/youtube_dl/init.py", line 410, in main
File "/home/canavan/Desktop/youtube-dl/youtube_dl/init.py", line 400, in _real_main
File "/home/canavan/Desktop/youtube-dl/youtube_dl/YoutubeDL.py", line 1653, in download
File "/home/canavan/Desktop/youtube-dl/youtube_dl/YoutubeDL.py", line 655, in extract_info
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/adultswim.py", line 153, in _real_extract
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/common.py", line 456, in _download_xml
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/common.py", line 438, in _download_webpage
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/common.py", line 345, in _download_webpage_handle
File "/home/canavan/Desktop/youtube-dl/youtube_dl/extractor/common.py", line 326, in _request_webpage
File "/home/canavan/Desktop/youtube-dl/youtube_dl/YoutubeDL.py", line 1860, in urlopen
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/home/canavan/Desktop/youtube-dl/youtube_dl/utils.py", line 641, in http_open
File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 979, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 827, in _send_output
msg = "\r\n".join(self._buffer)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 18: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: