Skip to content
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

Sytax error on CentOS #415

Closed
techzombie432 opened this issue Sep 7, 2012 · 4 comments
Closed

Sytax error on CentOS #415

techzombie432 opened this issue Sep 7, 2012 · 4 comments

Comments

@techzombie432
Copy link

@techzombie432 techzombie432 commented Sep 7, 2012

I get this error when I run youtube-dl

sys:1: DeprecationWarning: Non-ASCII character '\x93' in file /usr/local/bin/youtube-dl on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
File "/usr/local/bin/youtube-dl", line 2
PK???YW?6̢?V''???x8?e}W?j8??|
?&i??Փ?p?L??R?'?~??diź?
???G??;?^?z?<?RQ?U???t???<????+
|C?? Z?M???$ֹZ!?(??M????s'Օ?5"Ҧ??6"???U?cXi=Q?6?_?Q???Mޤ?Z????p???S??`??j?,?@? ??FBs???X??7 к?#?Mt
^
SyntaxError: invalid syntax

I have tried updating python and using your latest version

sudo wget --no-check-certificate http://raw.github.com/rg3/youtube-dl/master/youtube-dl -O /usr/local/bin/youtube-dl

Please help,

Your app IS THE BEST and I want to use it desperately.

@phihag
Copy link
Contributor

@phihag phihag commented Sep 7, 2012

That's strange, we should declare an encoding. I'll look into it.

@techzombie432
Copy link
Author

@techzombie432 techzombie432 commented Sep 7, 2012

awesome , thank you.

is there anything I can do in the meantime as a hack?

@phihag
Copy link
Contributor

@phihag phihag commented Sep 7, 2012

Oh, sorry, should've seen it right away. It looks like your version of Python is severely outdated. Can you update to 2.6 or newer? Also, what version of CentOS are you running?

As a workaround, you can just unzip the file and create a symlink youtube-dl, like this:

wget http://raw.github.com/rg3/youtube-dl/master/youtube-dl -O youtube-dl.zip
unzip -d ytdl youtube-dl.zip
ln -s ytdl/__main__.py youtube-dl
./youtube-dl
@techzombie432
Copy link
Author

@techzombie432 techzombie432 commented Sep 9, 2012

it works!!

I am sorry to have wasted your time with this.

I just installed a fresh python 2.7.3 and it works now.
I ran an update python on yum but it did not work before
It seems there is some issue with centOS and python, cent os needs the ld version for some admin tools so u must install the latest python from scratch . Here is what I used

wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz
tar -zxvf Python-2.6.6.tgz
cd Python-2.6.6
./configure && make && make install

Add the install path (/usr/local/bin/python : by default) to ~/.bash_profile

It will not break yum or any other things which are dependent on python24.

Hope this helps other centOS users.

thank y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.