trevorwelch / rh-profit-and-loss

Get profit and loss for your trading on Robinhood, export trades/dividends/options history, generate buy-and-hold comparison
39 stars 13 forks source link

Unable to login #6

Open parasharpandya opened 4 years ago

parasharpandya commented 4 years ago

I am pretty sure I am using the right username and password but I failed to login. I also disabled 2-factor authentication to ensure that doesn't cause any errors. Still won't work.

Python version 3.5 on Windows 10 64 bit.

Traceback (most recent call last): File "C:\Users\ppandya\Desktop\rh\Robinhood.py", line 111, in login res.raise_for_status() File "C:\Users\ppandya\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "get_profit_and_loss.py", line 324, in pickle=pickle) File "get_profit_and_loss.py", line 90, in rh_profit_and_loss logged_in = my_trader.login(username=username, password=password) File "C:\Users\ppandya\Desktop\rh\Robinhood.py", line 114, in login raise RH_exception.LoginFailed() exceptions.LoginFailed

image

trevorwelch commented 4 years ago

Sorry you're getting this error! So, this repo depends on https://github.com/Jamonek/Robinhood for the login flow. I don't currently have time to maintain this project, but if you're interested in making a PR on my repo with a fix for this I would welcome it. Sometimes the Jamonek repo is updated as Robinhood changes their "unofficial" API, sometimes it's not.

maxkwallace commented 4 years ago

@trevorwelch Thanks for this repo! I tried to use it today, ran into the same error @parasharpandya reported above, spent 5 minutes updating what I assumed were the dependencies copied in from https://github.com/Jamonek/Robinhood , tried again, and ran into another error. Unfortunately I accidentally cleared my terminal and I don't have the error message, but it was a JSON decode error. The login seemed to work fine, and after login the script was running for about 3-4 minutes with no terminal output. It produced a complete orders.csv.

I doubt I'll spend more time on this, but if anyone wants to see my fork, it's at https://github.com/maxkwallace/rh-profit-and-loss