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

Fix error on empty options chain #1995

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

stevenbischoff
Copy link
Contributor

Fixes #1969

Error occurs when Yahoo has no calls or puts for a ticker. I wasn't sure whether y'all would prefer an exception in this case instead (first pull request!), but I chose to return an "empty" Options namedtuple since _download_options() returns an empty dict.

Signed-off-by: Steven Bischoff <[email protected]>
@ValueRaider
Copy link
Collaborator

I don't use options so no opinion. Try tagging the few people that use options (search here).

@BiggRanger
Copy link

Returning empty works perfectly for me. I'd rather check for nothing than have to handle an exception.

@ValueRaider ValueRaider merged commit fa37798 into ranaroussi:dev Jul 24, 2024
1 check passed
@ValueRaider ValueRaider mentioned this pull request Aug 22, 2024
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

Successfully merging this pull request may close these issues.

3 participants