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

验证出错:KeyError: 'userId' #6

Closed
roostinghawk opened this issue Feb 18, 2023 · 3 comments
Closed

验证出错:KeyError: 'userId' #6

roostinghawk opened this issue Feb 18, 2023 · 3 comments

Comments

@roostinghawk
Copy link
Contributor

roostinghawk commented Feb 18, 2023

用户名密码没问题(用户名尝试了手机号、邮箱、小米ID),但一直这个错误,不知道是不是小米改了这块

➜  xiaogpt git:(main) micli.py list
Exception on login 188825209: 'userId'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/miservice/miaccount.py", line 71, in login
    self.token['userId'] = resp['userId']
KeyError: 'userId'
Error https://api.io.mi.com/app/home/device_list: Login failed
@yihong0618
Copy link
Owner

@roostinghawk
关掉 vpn 试试

@roostinghawk
Copy link
Contributor Author

咦,昨天回复的不见了
VPN 关了也不行,然后今天用公司网络好使了,可能跟家里路由器设置有关

@hirolee88
Copy link

hirolee88 commented Dec 21, 2023

可能是触发了 请确认安全手机
image
你试试先在同一台机器上登录 https://account.xiaomi.com/
返回的json 没有userid 如图
image

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

3 participants