Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problem when loading companies' profiles #99

Closed
PavelRechkalov opened this issue Jan 12, 2024 · 8 comments
Closed

[BUG] Problem when loading companies' profiles #99

PavelRechkalov opened this issue Jan 12, 2024 · 8 comments

Comments

@PavelRechkalov
Copy link

PavelRechkalov commented Jan 12, 2024

When I tray to run "companies_profile = companies.get_profile()" I get the following:
"Obtaining company profiles: 100%|██████████| 112/112 [00:16<00:00, 6.94it/s]"

It remains this way for minutes and never ends. However, it loads historical prices w/ no problem

P.S. I'm trying to retrieve that data for 116 companies

@JerBouma
Copy link
Owner

Could you share some more information about your FMP plan, what code you are running etc? For example, I've built in a wait timer when you hit the API limit per minute. Trying to understand what could be the issue here as it works fine for me.

@PavelRechkalov
Copy link
Author

PavelRechkalov commented Jan 12, 2024

Sure thing sir:

  • It's starter plan
  • Code snippet:
    `
    companies = Toolkit(
    assets_list
    , quarterly = True
    , api_key = fmp_api_key
    , start_date="2005-01-01"
    ,sleep_timer = False)

companies_profile = companies.get_profile()
`

I use Jupyter extension for VSCode

@JerBouma
Copy link
Owner

Could you provide me with the ticker list as well? I'll look into it somewhere this weekend!

@PavelRechkalov
Copy link
Author

PavelRechkalov commented Jan 12, 2024

Here it goes:

assets_list = [

'BRK-B', 'TMUS', 'SONY', 'DBSDY', 'IDXX', 'FTNT', 'VEEV'

,'LRCX', 'NXPI', 'WMT', 'PEP', 'GE', 'ORCL', 'NKE', 'MRK'
,'TSM','HLNE', 'DHR', 'CSCO', 'EME', 'TMO', 'ACN', 'ADP', 'HPQ'

,'PG', 'DLB', 'ABT', 'FTAI', 'CL', 'DE', 'COF', 'CAT'

,'AVGO', 'LMT', 'HD', 'MCD', 'V', 'LHX', 'JNJ', 'TGT'
,'RTX', 'KO', 'TGLS', 'PH', 'VOYA', 'IBP', 'IBKR', 'SPGI'
,'MCO', 'WM'

,'TSLA', 'AMD', 'AMZN', 'GOOGL', 'META', 'ON', 'TTD', 'ANET'
,'CRWD', 'MDB', 'EXAS', 'CDNS', 'RPD', 'NOW', 'QLYS', 'MELI'
,'REGN', 'TDG', 'AAPL', 'NVDA', 'MSFT', 'EG'

,'JPM', 'DLR', 'DTE', 'ARE', 'BBY'

,'BX', 'MS', 'MED', 'VZ', 'ARLP', 'BLX', 'CCOI', 'HTGC'

,'BLK', 'IBM', 'MMM', 'GILD', 'PFE', 'SPOK', 'F', 'BTI'

,'ISRG', 'ANSS', 'PYPL', 'MNST', 'DIS', 'NFLX', 'BMY', 'NVO'
,'ADBE', 'BAC'

,'UNA.AS', 'PRY.MI', 'SAF.PA', 'MC.PA', 'ASML.AS', 'RACE.MI', 'OR.PA'
,'CDI.PA', 'ADYEN.AS'

]

@PavelRechkalov
Copy link
Author

Sir, the issue was with my API permissions (behind the scene every API call was returning the error 403). I had to approach FMP's support and the issue was resolved.

Nevertheless, it seems that if a user's permissions become limited or removed, "companies.get_profile()" never gets resolved, i.e it's stuck in infinite execution.

My deepest apologies for taking your time.

@JerBouma
Copy link
Owner

Sir, the issue was with my API permissions (behind the scene every API call was returning the error 403). I had to approach FMP's support and the issue was resolved.

Nevertheless, it seems that if a user's permissions become limited or removed, "companies.get_profile()" never gets resolved, i.e it's stuck in infinite execution.

My deepest apologies for taking your time.

Hi! No worries, do you have the exact error for me? Then I can add it into the Toolkit so that the next time someone has this issue it returns a message!

@PavelRechkalov
Copy link
Author

There's no error per se. What was happening is the following:

  • I run "companies_profile = companies.get_profile()"
  • The progress bar reaches 100% in about 30sec
  • Nevertheless, given the API permission issues I had, the "companies_profile = companies.get_profile()" code line continued running for infinite amount of time (I waited for 30 min and it never stopped)

I think the best way for you to reproduce this error is to use an API w/ suspended permission. In my case my permissions were suspended by FMP by an error.

Once again, that's a very niche case

@JerBouma
Copy link
Owner

Got it, I'll note this down so that if it ever happens again to someone else I know where to point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants