Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
yt crashes when inputting swedish letters in search field #5334
Comments
|
Sorry, this was supposed to go into yt, not youtube-dl |
äåö ÄÅÖ are swedish letters, yt crashes when they are put into a search in the search field, or it autocompletes to a youtube video containing these.
Traceback (most recent call last):
File "/usr/bin/yt", line 439, in
main()
File "/usr/bin/yt", line 18, in main
ui.run()
File "/usr/bin/yt", line 55, in run
curses.wrapper(self._curses_main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/bin/yt", line 102, in _curses_main
self._run_pager()
File "/usr/bin/yt", line 250, in _run_pager
s = self._input('search')
File "/usr/bin/yt", line 143, in _input
input_win.addstr(0, 0, ('%s' % (get_query_result(s),)).encode(self._code))
File "/usr/bin/yt", line 430, in get_query_result
result = json.load(urllib2.urlopen('%s?%s' % (url, urllib.urlencode(query))))
File "/usr/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: unexpected end of data