这是indexloc提供的服务,不要输入任何密码
Skip to content

[BugFix] economy.calendar(provider='nasdaq'): Fix 'No record found' Error Raising Instead Of Returning #7178

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

deeleeramone
Copy link
Contributor

This PR fixes a bug in the error detection logic of obb.economy.calendar(provider="nadaq").

A previous PR incorporated more robust error handling, and failed to anticipate the error for "No data found" while iterating over multiple dates. Instead of returning the data that does exist, it raised the error.

This PR fixes it by:

  • Filtering the date range for date.weekday() < 5
  • Only raise if no data has been appended to the output.

The default start/end dates have been adjusted to be -2/+3 days from today.

As of today, this can be tested with the default settings: obb.economy.calendar(provider="nasdaq")

@deeleeramone deeleeramone requested a review from piiq July 23, 2025 17:36
@deeleeramone deeleeramone added bug Bugs and bug fixes platform OpenBB Platform v4 PRs for v4 labels Jul 23, 2025
@deeleeramone deeleeramone added this pull request to the merge queue Jul 24, 2025
Merged via the queue into develop with commit 77797d9 Jul 24, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and bug fixes platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants