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

由于python版本pow函数的问题MacOS无法登录个人网易云音乐账号 #477

Closed
xmfbit opened this issue Feb 3, 2017 · 1 comment

Comments

@xmfbit
Copy link

xmfbit commented Feb 3, 2017

您好,@darknessomi,您的作品我很喜欢。但是我在使用中尝试登录个人的网易云音乐账号,musicbox异常退出,并提示以下错误信息:

TypeError: __pow__() takes exactly 2 arguments (3 given)

我使用的系统为MacOS10.12.2,在安装musicbox时我使用了GitHub中的源码并使用python setup.py install命令进行安装。

我搜索后发现这和python3与python2中的pow函数接受参数不同有关,请参见这个GiitHub上的讨论帖

所以,我将api.py文件rsaEncrypt(text, pubKey,modulus)函数中的rs变量计算过程修改如下:

tmp = pow(int(binascii.hexlify(text), 16), int(pubKey, 16))
rs = tmp % int(modulus, 16)

这样,才能够登录我的个人账号。

@kigawas kigawas mentioned this issue Feb 3, 2017
@kigawas
Copy link
Collaborator

kigawas commented Feb 3, 2017

应该好了,你git pull再尝试一下

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