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

直接git clone过来,执行任何参数都会提示格式错误(行数507) #157

Open
realercheng opened this issue Jan 9, 2021 · 3 comments

Comments

@realercheng
Copy link

$ python3 pan.baidu.com.py d "https://pan.baidu.com/s/15FA0l6fMfyHfFV4sDyfwPA" -s rr7o
File "pan.baidu.com.py", line 507
print s% (1, 93, ' !! you don't install shadowsocks for python2.')
^
SyntaxError: invalid syntax

@realercheng realercheng changed the title 执行git clone过来,执行任何参数都会提示格式错误(行数507) 直接git clone过来,执行任何参数都会提示格式错误(行数507) Jan 9, 2021
@PeterDing
Copy link
Owner

@realercheng pan.baidu.com.py 是 python2 脚本。用 pip2 安装依赖后,用 python2 执行。

@realercheng
Copy link
Author

使用python2执行报了另外一个错误,用的系统是CentOS 7.8:

$ ./pan.baidu.com.py login
Traceback (most recent call last):
File "./pan.baidu.com.py", line 22, in
import rsa
File "/usr/lib/python2.7/site-packages/rsa/init.py", line 24, in
from rsa.key import newkeys, PrivateKey, PublicKey
File "/usr/lib/python2.7/site-packages/rsa/key.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file /usr/lib/python2.7/site-packages/rsa/key.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

@PeterDing
Copy link
Owner

@realercheng 最新的 rsa 包没有 rsa/init.py。你可能需要用 pip2 install rsa --upgrade 升级到最新版本。

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

No branches or pull requests

2 participants