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.
DeprecationWarning Non-ASCII character '\xb3' #477
Comments
|
Which version of Python are you using? If you're using 2.5 or less, you're probably hitting this error. Following the directions should solve it. You can also upgrade Python if it's possible on your server, assuming you're using an outdated version of course. |
|
As @Tailszefox said, this is well-documented. The file is not encrypted, but compressed, and you can always unpack it (or install from git). Note that cPython 2.5 has been unsupported for quite a while. |
|
Like I said I have Python 2.7 installed parallel. I know little enough not to know how the script will get hold of the 2.7 version. So I take it that in the script it links to the default python location. I need to change that in the file. how do get the file open, so I can do that. So 2.4 and 2.7 is installed on my server, to link to 2.7 /usr/local/bin/python2.7 Can you help me? |
|
If you open the file, you will notice a sigle "clean" line at the beginning
replace it with
or simply run youtube-dl this way: |
|
Here is what I did: wget https://github.com/rg3/youtube-dl/raw/2012.10.09/youtube-dl unzip youtube-dl nano utils.py Replace #!/usr/bin/env python with #!/usr/local/bin/python2.7 saved changes. Now I don't know how to compile it again, I do not have git on my system. I did read: If you modify the code, you can run it by executing the __main__.py file. To recompile the executable, run make compile. But like I said, I don't know enough about this arena. Could you explain to me how to compile it again? |
|
What @FiloSottile meant was that you can try opening the binary in a regular editor and just change the first line. For example, you can do Trying it though, vi or nano seem to corrupt the file when saving back, which isn't surprising given that they're not really meant to edit binaries. sed should do the trick:
This will replace the first line of the file with the correct path. Another solution would be to unzip youtube-dl (like you did) and edit The line that adds the Python path is directly coded into the Makefile, so you'd have to change that if you wanted to recompile it, not the code itself. |
I have CENTOS 5.8 server and I used youtube-dl for some time. Few weeks ago when I did a update, everything when wrong. In the past I could access the youtube-dl file and like it to the correct python version since I have more then one on the server. But now it is encrypted....
Please help!