Repository navigation
Conversation
|
Look at the diff. Also rebase to dev branch https://ranaroussi.github.io/yfinance/development/code.html |
|
Apologies for the unintentional removal. I have restored the blank line between the try/except block and the metadata formatting check. The fix is pushed to the same branch. |
|
Ok you aren't checking diff. |
Gaze31
left a comment
There was a problem hiding this comment.
Apologies — that was an unintentional removal. The blank line has been restored in the latest commit.
Apologies — I accidentally introduced a nested function definition. Fixed now and pushed to the same branch. |
|
Fixed — removed the duplicate function definition and cleaned up indentation. The try/except now correctly wraps only the intraday cache call. |
|
rebase to dev branch https://ranaroussi.github.io/yfinance/development/code.html then git squash |
Fixes #2745
Problem
get_history_metadata()raisesYFPricesMissingErrorfor valid,non-delisted tickers when intraday data is unavailable, even after
history()succeeds. ThetradingPeriodsfetch was crashing theentire method instead of gracefully continuing.
Fix
Wrapped the intraday cache call in a try/except block so that
YFPricesMissingErroris caught and ignored. ThetradingPeriodsfield is optional enrichment — its absence should not prevent
returning already-cached metadata.
Testing
Tested with ROG.SW ticker as described in the issue report.