Сообщение об ошибке не очень полезно.
Код: Выделить всё
Traceback (most recent call last):
File "rhs.py", line 962, in f2
rbh_ = rbh.authentication.login (username="....", password="....", mfa_code=totp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mycomputer/anaconda3/lib/python3.12/site-packages/robin_stocks/robinhood/authentication.py", line 198, in login
raise Exception(data['detail'])
~~~~^^^^^^^^^^
KeyError: 'detail'
Код: Выделить всё
data = request_post(url, payload)Код: Выделить всё
{'verification_workflow': {'id': '***5d74a-****-****-9721-cb00a6d69***', 'workflow_status': 'workflow_status_internal_pending'}}Код: Выделить всё
url = login_url()
payload = {
'client_id': 'c82SH0WZOsabOXGP2sxqcj34FxkvfnWRZBKlBjFS',
'expires_in': expiresIn,
'grant_type': 'password',
'password': password,
'scope': scope,
'username': username,
'challenge_type': challenge_type,
'device_token': device_token
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... ed-working
Мобильная версия