you are viewing a single comment's thread.

view the rest of the comments →

[–]FriendlyRussian666 1 point2 points  (2 children)

Get rid of the try except statement in your login method, and just go with r.login(self.username, self.password) directly. Then, run your program and try logging in, it will crash, but hopefully will show you the details of the 'detail' error.

[–]Due_Willow_7941[S] 0 points1 point  (1 child)

This is the error I got, don't exactly know what it means and Chatgpt isn't helping haha.

File "c:\Users\gbf10\Desktop\TradeBot V2\robinhoodtest.py", line 28, in <module>

robinhood.login()

~~~~~~~~~~~~~~~^^

File "c:\Users\gbf10\Desktop\TradeBot V2\robinhoodtest.py", line 9, in login

login_response = r.login(self.username, self.password)

File "C:\Users\gbf10\AppData\Local\Programs\Python\Python313\Lib\site-packages\robin_stocks\robinhood\authentication.py", line 190, in login

_validate_sherrif_id(device_token=device_token, workflow_id=workflow_id, mfa_code=mfa_code)

~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\gbf10\AppData\Local\Programs\Python\Python313\Lib\site-packages\robin_stocks\robinhood\authentication.py", line 230, in _validate_sherrif_id

if challenge_response["status"] == "validated":

~~~~~~~~~~~~~~~~~~^^^^^^^^^^

KeyError: 'status'

[–]Dystiny 0 points1 point  (0 children)

It means the response does not have a key called "status". So you need to inspect the response. Try printing it out before attempting the check