[Python] KeyError: 'detail' - robin_stocks login error

Discussão em 'Python' iniciado por Stack, Dezembro 21, 2024.

  1. Stack

    Stack Membro Participativo

    This code sends an SMS code to my phone. However, the code gives an error without even giving it input for the SMS code.

    import robin_stocks.robinhood as r

    r.authentication.login(
    username=username,
    password=password,
    expiresIn=86400,
    scope='internal',
    by_sms=True,
    store_session=True,
    mfa_code=None,
    pickle_name=''
    )


    KeyError Traceback (most recent call last)
    <ipython-input-9-694de4805c3e> in <cell line: 3>()
    1 import robin_stocks.robinhood as r
    2
    ----> 3 r.authentication.login(username=username, password=password, expiresIn=86400, scope='internal',
    4 by_sms=True, store_session=True, mfa_code=None, pickle_name='')

    /usr/local/lib/python3.10/dist-packages/robin_stocks/robinhood/authentication.py in login(username, password, expiresIn, scope, by_sms, store_session, mfa_code, pickle_path, pickle_name)

    KeyError: 'detail'


    How can I send an SMS code using robinhood?

    Continue reading...

Compartilhe esta Página