Code Monkey home page Code Monkey logo

Comments (10)

adithyabsk avatar adithyabsk commented on August 16, 2024

Can you tell me which version of the package you are using?

>>>  import pyrh
>>> pyrh.__version__

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

@adithyabsk thanks for getting back so quickly!

It is '2.0.1'

from pyrh.

adithyabsk avatar adithyabsk commented on August 16, 2024

That's really strange--don't seem to be having that issue on my end. Just pushed the latest code to pypi so I'd be able to better debug, can you downloaded the latest version of the package 2.1.1?

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

Reinstalled latest version but still same error :/

I get the following notification on the app to verify if it is me trying to access since i have "Device approvals" under 2FA ->

image

image

from pyrh.

adithyabsk avatar adithyabsk commented on August 16, 2024

yeah not sure. maybe it has something to do with your locale, and the return code from robinhood. If you install the project from source and throw a breakpoint import pdb; pdb.set_trace() before marshmallow does the deserialization, we might be able to figure out more about what's going wrong. Specifically, before line 290 in your error traceback.

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

Gotcha! I will do the debugging

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

So I looked at the issue before line 290 in sessionmanager.py and seems like after sending post request in at 273 I am getting response -

b'{"detail":"Request blocked, prompt challenge issued.","challenge":{"id":"_random id here_","user":"eaxxxxxxx","type":"prompt","alternate_type":"sms","status":"issued","remaining_retries":3,"remaining_attempts":1,"expires_at":"2023-01-24T02:54:56.445001-05:00","updated_at":"2023-01-24T02:49:56.445342-05:00","flow_id":"login","mfa_status":"prompt","silent":false,"silent_factor_id":null}}'

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

Issue resolved! The problem was that I had "device approval" option enabled for 2FA and so everytime I was accessing through api, RH was asking a trusted device (my phone) for approval but by that time the request is denied to my api.

Solved it by changing to text based 2FA or 3rd party authenticator.

from pyrh.

adithyabsk avatar adithyabsk commented on August 16, 2024

@akibnizam glad it's resolved. If you have the time it would be great to throw up a quick PR to catch this error and display a more meaningful error code. (ie parse the additional response type from Robinhood and say it's not supported)

from pyrh.

akibnizam avatar akibnizam commented on August 16, 2024

@adithyabsk sounds good! I will make a PR related to it

from pyrh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.