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.
Crunchyroll: UnicodeDecodeError: 'ascii' codec can't decode byte #4181
Comments
|
Thank you for the report. You are correct that in Python one can usually use However, crunchyroll's URL generation scheme is quite crazy and involves lots of numeric (not bitwise) operations, so it was more convenient to write code that deals with integers. I have fixed the problem in youtube-dl 2014.11.13.1 and newer (type |
|
Thanks for your attention. error:
so on utils.py line 846, change it to:
I only added a 'b' before the string. |
|
Thanks, I've fixed this as well. Note that current 2.7 versions should work fine here, you seem to be running a somewhat older version. |
When downloading a video from Crunchyroll, I encoutered this problem.
Cmdline: youtube-dl 'http://www.crunchyroll.com/case-closed/episode-754-the-tragedy-of-the-red-woman-steam-663019?p360=1' -F
version: 2014.11.13
Analysis
I've taken a look at the
intlist_to_bytesfunction with my limited python knowledge, but was not able to fix the issue:Things such as trying to set an encoding (utf-8) did not work out, and only changed the error, persumably because the bytes are consumed one by one by the chr function.
Also changing the function to essentially a
return bytes(xs)did not work out, as the zlib.decode in the_decrypt_subtitlesfailed to work.I'm not at all knowledgeable in python, but I think something is deep wrong with the
intlist_to_bytesfunction. it should be an easy built-in python function, and should work with byte-strings or something. But who am I to say that. :)Can you take a look at this?