offici5l / MiUnlockTool

MiUnlockTool developed to retrieve encryptData(token) for Xiaomi devices for unlocking bootloader, It is compatible with all platforms.
Apache License 2.0
290 stars 17 forks source link

KeyError: 'passToken' #28

Closed muqiuhan closed 6 months ago

muqiuhan commented 6 months ago
Traceback (most recent call last):
  File "/home/muqiu/Applications/MiUnlockTool/MiUnlockTool.py", line 194, in <module>
    data = json.loads(requests.get("https://account.xiaomi.com/pass/serviceLogin?sid=unlockApi&_json=true&passive=true&hidden=true", headers=headers, cookies={'passToken': p['passToken'], 'userId': str(p['userId']), 'deviceId': parse_qs(urlparse(p['location']).query)['d'][0]}).text.replace("&&&START&&&", ""))
                                                                                                                                                                            ~^^^^^^^^^^^^^
KeyError: 'passToken'
offici5l commented 6 months ago
offici5l commented 6 months ago

update MiUnlockTool

If the problem persists : https://github.com/offici5l/MiUnlockTool/issues/29

muqiuhan commented 6 months ago

this issue was solved after updating MiUnlockTool.py.