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

Handle errors when tickers can't be loaded #1986

Conversation

stkerr
Copy link
Contributor

@stkerr stkerr commented Jun 24, 2022

Description

This PR gracefully handles errors when certain tickers can't be loaded as part of /stocks/ca commands. This can happen for certain tickers like SPY. When a ticker can't be loaded, it is removed from the comparison set and the command continues if possible. An example of what happens is in the screenshot below.

image

How has this been tested?

Manual testing and pytest

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@stkerr stkerr changed the title Balance sheet handle errors when tickers can't be loaded Handle errors when tickers can't be loaded Jun 24, 2022
@DidierRLopes DidierRLopes added the bug Fix bug label Jun 24, 2022
@DidierRLopes
Copy link
Collaborator

This is a nice addition.

Is this ready to be reviewed?

@stkerr stkerr force-pushed the stkerr-balance-sheet-handle-error-tickers branch from 31b89b0 to 32c7f15 Compare June 25, 2022 13:32
@stkerr stkerr marked this pull request as ready for review June 25, 2022 13:51
@stkerr
Copy link
Contributor Author

stkerr commented Jun 25, 2022

@DidierRLopes all cleaned up and ready for your review!

Copy link
Collaborator

@DidierRLopes DidierRLopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, this is a very nice one.

I believe someone had in fact ask for this before at some point!

@DidierRLopes DidierRLopes merged commit b408684 into OpenBB-finance:main Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants