Giter Site home page Giter Site logo

Comments (6)

nongdenchet avatar nongdenchet commented on July 30, 2024 2

I have tested and confirmed that the issue is fixed for me. Thank you @KurtPrice

from finnhub-python.

KurtPrice avatar KurtPrice commented on July 30, 2024

I've been seeing the same issue. I'm not sure why this is happening. I'm going to look into a fix myself. My initial thoughts are that the validation on responses is incorrect and throwing this exception erroneously. Using the API documentation I was able to find https://finnhub.io/api/v1/stock/option-chain?symbol=TSLA which works without an API key in my browser. So in the mean time it may just be best to setup something with bs4 to grab the info from https.

If you have any ideas that are causing this issue, let me know here. I'd be excited to actually resolve this issue.

from finnhub-python.

KurtPrice avatar KurtPrice commented on July 30, 2024

Okay, so I figured out the root cause. It turns out that the api is returning the message without encoding. i.e. content-type = 'text/plain'.

client.py:L52 with raise the exception that we see here. In the mean time you can add an if statement to handle this specific call. I have a hunch that this is the expected behavior by the client, and the real issue lies with the API not setting the content-type to be application/json.

I'll make a pull request either way to fix this.

from finnhub-python.

KurtPrice avatar KurtPrice commented on July 30, 2024

Pull request I mentioned above: #18 @nongdenchet

from finnhub-python.

nongdenchet avatar nongdenchet commented on July 30, 2024

hey guys I have been busy recently. Let's me have a look

from finnhub-python.

nongdenchet avatar nongdenchet commented on July 30, 2024

Please upgrade your library to 2.2.1 to get the fix

from finnhub-python.

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.