Coder Social home page Coder Social logo

Client about finnhub-python HOT 7 CLOSED

finnhub-stock-api avatar finnhub-stock-api commented on July 21, 2024
Client

from finnhub-python.

Comments (7)

fijiaaron avatar fijiaaron commented on July 21, 2024 6

Nevermind, I see my error -- my file is named finnhub.py and it's trying to import that

from finnhub-python.

nongdenchet avatar nongdenchet commented on July 21, 2024

Hi @PLAYER69 I can execute it just fine.

  1. Can you check what is the version of finnhub-python on your machine via pip show finnhub-python? Make sure you have the latest version which is 2.0.0.
  2. Try to uninstall and install again if you don't have the latest version.

from finnhub-python.

PLAYER69 avatar PLAYER69 commented on July 21, 2024

from finnhub-python.

nongdenchet avatar nongdenchet commented on July 21, 2024

I am closing this issue now. If you need more helps, let's us know

from finnhub-python.

fijiaaron avatar fijiaaron commented on July 21, 2024

I'm seeing what appears to be this same issue again with finnhub-python 2.4.0

Here is the simple script I'm running

(finnhub) aaronevans@macbook:finnhub $ cat finnhub.py 
import finnhub
import os

# Setup client
FINNHUB_API_KEY = os.environ.get('FINNHUB_API_KEY')
finnhub_client = finnhub.Client(api_key=FINNHUB_API_KEY)

# Stock candles
res = finnhub_client.stock_candles('AAPL', 'D', 1590988249, 1591852249)
print(res)
(finnhub) aaronevans@macbook:finnhub $ python finnhub.py
Traceback (most recent call last):
  File "finnhub.py", line 1, in <module>
    import finnhub
  File "/Users/aaronevans/scratch/finnhub/finnhub.py", line 6, in <module>
    finnhub_client = finnhub.Client(api_key=FINNHUB_API_KEY)
AttributeError: partially initialized module 'finnhub' has no attribute 'Client' (most likely due to a circular import)

(finnhub) aaronevans@macbook:finnhub $ pip show finnhub-python
Name: finnhub-python
Version: 2.4.0
Summary: Finnhub API
Home-page: https://finnhub.io/docs/api
Author: Finnhub
Author-email: [email protected]
License: Apache-2.0
Location: /Users/aaronevans/.pyenv/versions/3.8.2/envs/finnhub/lib/python3.8/site-packages
Requires: requests
Required-by: 
(finnhub) aaronevans@macbook:finnhub $ pip freeze
certifi==2020.12.5
chardet==4.0.0
finnhub-python==2.4.0
idna==2.10
requests==2.25.1
urllib3==1.26.3

Am I doing something wrong?

from finnhub-python.

trailblazn avatar trailblazn commented on July 21, 2024

Nevermind, I see my error -- my file is named finnhub.py and it's trying to import that

This helped me, thanks!

from finnhub-python.

Tedmcm avatar Tedmcm commented on July 21, 2024

Hi, Im having the same issue but cant uninstall it. I installed today with the updated pip install for the newest version but it wont install that version and i cant find/get any uninstall to work?

Screen Shot 2021-09-02 at 3 35 45 PM

Screen Shot 2021-09-02 at 3 37 46 PM

I cant find any commands to let me install a specific version or update the version i have? it wont let me use .Client or any of the calls? Can you give me the uninstall/install commands? im using the lastest ones from
(https://pypi.org/project/finnhub-python/). and it only installs the old version??

I found where to change the version but it still doenst not work...

Screen Shot 2021-09-02 at 3 43 38 PM

I get the same errors.. no .Client

Screen Shot 2021-09-02 at 3 44 45 PM

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.