joshfraser / robinhood-to-csv

Python script to export Robinhood trades to a CSV file
MIT License
259 stars 109 forks source link

How to bring in MFA info? #39

Closed kfollmer24 closed 5 years ago

kfollmer24 commented 5 years ago
>python csv-export.py

Traceback (most recent call last):
  File "csv-export.py", line 53, in <module>
    if logged_in != True and logged_in.get('non_field_errors') == None and logged_in['mfa_required'] == True:
KeyError: 'mfa_required'
s-rajaraman commented 5 years ago

Based on the code, you can do this:

python csv-export.py --mfa_code 'blah-balh'

Or you can set an environment variable to do this:

export RH_MFA='blah blah'

s-rajaraman commented 5 years ago

After testing this, exporting an environment variable works but not passing it through the command line.

joshfraser commented 5 years ago

Fixed wth #40. Thanks @s-rajaraman!